Versions in this module Expand all Collapse all v0 v0.0.2 Nov 3, 2023 Changes in this version + const HighestPrec + const LowestPrec + const UnaryPrec + var NoPos = Pos + type File struct + func NewFile(filename string, base, size int) *File + func (f *File) AddLine(offset int) + func (f *File) AddLineInfo(offset int, filename string, line int) + func (f *File) Base() int + func (f *File) Line(p Pos) int + func (f *File) LineCount() int + func (f *File) MergeLine(line int) + func (f *File) Name() string + func (f *File) Offset(p Pos) int + func (f *File) Pos(offset int, rel RelPos) Pos + func (f *File) Position(p Pos) (pos Position) + func (f *File) PositionFor(p Pos, adjusted bool) (pos Position) + func (f *File) SetLines(lines []int) bool + func (f *File) SetLinesForContent(content []byte) + func (f *File) Size() int + type Pos struct + func (p Pos) Add(n int) Pos + func (p Pos) Before(q Pos) bool + func (p Pos) Column() int + func (p Pos) File() *File + func (p Pos) Filename() string + func (p Pos) HasRelPos() bool + func (p Pos) IsNewline() bool + func (p Pos) IsValid() bool + func (p Pos) Line() int + func (p Pos) Offset() int + func (p Pos) Position() Position + func (p Pos) RelPos() RelPos + func (p Pos) String() string + func (p Pos) WithRel(rel RelPos) Pos + type Position struct + Column int + Filename string + Line int + Offset int + func (pos *Position) IsValid() bool + func (pos Position) String() string + type RelPos int + const Blank + const Elided + const NewSection + const Newline + const NoRelPos + const NoSpace + func (p RelPos) Pos() Pos + func (p RelPos) String() string + type Token int + const ADD + const AND + const ARROW + const ATTRIBUTE + const BIND + const BOTTOM + const COLON + const COMMA + const COMMENT + const ELLIPSIS + const EOF + const EQL + const FALSE + const FLOAT + const FOR + const FUNC + const GEQ + const GTR + const IDENT + const IDIV + const IF + const ILLEGAL + const IMOD + const IN + const INT + const INTERPOLATION + const IQUO + const IREM + const LAND + const LBRACE + const LBRACK + const LEQ + const LET + const LOR + const LPAREN + const LSS + const MAT + const MUL + const NEQ + const NMAT + const NOT + const NULL + const OPTION + const OR + const PERIOD + const POW + const QUO + const RBRACE + const RBRACK + const RPAREN + const SEMICOLON + const STRING + const SUB + const TRUE + func Lookup(ident string) Token + func (tok Token) IsKeyword() bool + func (tok Token) IsLiteral() bool + func (tok Token) IsOperator() bool + func (tok Token) Precedence() int + func (tok Token) String() string