model.bend checks
raw source on the hub · import 0x88d5b48c03f82f217d3a2aa0656744f4/model.bend as Model
2 imports
import Base import ./types.bend as T
Definitions
def get source · line 5 · raw
@text:String -> @pos:Nat -> Result<&1, &1, 0x88d5b48c03f82f217d3a2aa0656744f4/types.Error, Char>
Independent sequential specification: no Vec, main, binary search, or line index.
def advance source · line 12 · raw
@line:U32 -> @col:U32 -> @lf:Bool -> 0x88d5b48c03f82f217d3a2aa0656744f4/types.Location
def locate_go source · line 17 · raw
@text:String -> @pos:Nat -> @loc:0x88d5b48c03f82f217d3a2aa0656744f4/types.Location -> Result<&1, &1, 0x88d5b48c03f82f217d3a2aa0656744f4/types.Error, 0x88d5b48c03f82f217d3a2aa0656744f4/types.Location>
def locate source · line 24 · raw
@text:String -> @pos:U32 -> Result<&1, &1, 0x88d5b48c03f82f217d3a2aa0656744f4/types.Error, 0x88d5b48c03f82f217d3a2aa0656744f4/types.Location>
def slice source · line 27 · raw
@text:String -> @start:Nat -> @size:Nat -> String
def location_eq source · line 32 · raw
@a:0x88d5b48c03f82f217d3a2aa0656744f4/types.Location -> @b:0x88d5b48c03f82f217d3a2aa0656744f4/types.Location -> Bool
Reverse lookup enumerates positions from a freshly scanned string. It cannot reproduce the implementation's line-index arithmetic by accident.
def choose_offset source · line 36 · raw
@pos:U32 -> @later:Result<&1, &1, 0x88d5b48c03f82f217d3a2aa0656744f4/types.Error, U32> -> @same:Bool -> Result<&1, &1, 0x88d5b48c03f82f217d3a2aa0656744f4/types.Error, U32>
def next source · line 41 · raw
@loc:0x88d5b48c03f82f217d3a2aa0656744f4/types.Location -> @c:Char -> 0x88d5b48c03f82f217d3a2aa0656744f4/types.Location
def offset_go source · line 46 · raw
@text:String -> @+wanted:0x88d5b48c03f82f217d3a2aa0656744f4/types.Location -> @+loc:0x88d5b48c03f82f217d3a2aa0656744f4/types.Location -> @+pos:U32 -> Result<&1, &1, 0x88d5b48c03f82f217d3a2aa0656744f4/types.Error, U32>
def offset source · line 53 · raw
@text:String -> @loc:0x88d5b48c03f82f217d3a2aa0656744f4/types.Location -> Result<&1, &1, 0x88d5b48c03f82f217d3a2aa0656744f4/types.Error, U32>
def line_count source · line 56 · raw
@text:String -> U32