Documentation
¶
Index ¶
- Variables
- type Position
- type Token
- type TokenMap
- func (this *TokenMap) AddToken(str string)
- func (this *TokenMap) Equals(that *TokenMap) bool
- func (this *TokenMap) Len() int
- func (this *TokenMap) String() string
- func (this *TokenMap) Strings() []string
- func (this *TokenMap) TokenString(typ Type) string
- func (this *TokenMap) Tokens() []*Token
- func (this *TokenMap) Type(key string) Type
- func (this *TokenMap) WriteFile(file string) error
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var FRONTENDTokens = NewMapFromStrings([]string{
"id",
"tokId",
":",
";",
"regDefId",
"ignoredTokId",
"|",
".",
"char_lit",
"-",
"[",
"]",
"{",
"}",
"(",
")",
"prodId",
"g_sdt_lit",
"error",
"empty",
"string_lit",
})
Functions ¶
This section is empty.
Types ¶
type Position ¶
type Position struct { Offset int // offset, starting at 0 Line int // line number, starting at 1 Column int // column number, starting at 1 (character count) }
Position describes an arbitrary source position including the file, line, and column location. A Position is valid if the line number is > 0.
type TokenMap ¶
type TokenMap struct {
// contains filtered or unexported fields
}
func NewMapFromFile ¶
func NewMapFromString ¶
func NewMapFromStrings ¶
func (*TokenMap) TokenString ¶
Click to show internal directories.
Click to hide internal directories.