Versions in this module Expand all Collapse all v0 v0.2.8 Nov 4, 2024 v0.2.7 Oct 31, 2024 v0.2.6 Oct 24, 2024 v0.2.5 Oct 16, 2024 v0.2.4 Oct 14, 2024 Changes in this version + const HighestPrec + const LowestPrec + const UnaryPrec + func IsIdentifier(name string) bool + func IsKeyword(name string) bool + type File struct + func (f *File) AddLine(offset int) + func (f *File) AddLineColumnInfo(offset int, filename string, line, column 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) LineStart(line int) Pos + func (f *File) Lines() []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) 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 FileSet struct + func NewFileSet() *FileSet + func (s *FileSet) AddFile(filename string, base, size int) *File + func (s *FileSet) Base() int + func (s *FileSet) File(p Pos) (f *File) + func (s *FileSet) Iterate(f func(*File) bool) + func (s *FileSet) Position(p Pos) (pos Position) + func (s *FileSet) PositionFor(p Pos, adjusted bool) (pos Position) + func (s *FileSet) RemoveFile(file *File) + type Pos int + const NoPos + func (p Pos) IsValid() bool + type Position struct + Column int + Filename string + Line int + Offset int + func (pos *Position) IsValid() bool + func (pos Position) String() string + type Token int + const ADD + const AND + const AND_NOT + const ARRAY + const ASSIGN + const AT + const CHAR + const COMMA + const COMMENT + const CONST + const ENUM + const EOF + const EQL + const FILE + const FLOAT + const GEQ + const GTR + const IDENT + const ILLEGAL + const IMPORT + const INT + const INTERFACE + const LAND + const LBRACE + const LBRACK + const LEQ + const LOR + const LPAREN + const LSS + const MAP + const MUL + const NEQ + const NOT + const OR + const PACKAGE + const PERIOD + const QUO + const RBRACE + const RBRACK + const REM + const RPAREN + const SEMICOLON + const SHL + const SHR + const STRING + const STRUCT + const SUB + const VECTOR + const XOR + func Lookup(ident string) Token + func (op Token) Precedence() int + func (tok Token) IsKeyword() bool + func (tok Token) IsLiteral() bool + func (tok Token) IsOperator() bool + func (tok Token) String() string