Documentation ¶
Index ¶
- Constants
- func CharToNum(r rune) int
- type AssignmentToken
- type BinarySelectorToken
- type EOFToken
- type IdentifierToken
- type KeywordToken
- type LiteralArrayToken
- type LiteralToken
- type LiteralTokenInterface
- type MultiKeywordLiteralToken
- type NumberLiteralToken
- type Scanner
- type SpecialCharacterToken
- type Token
- func (t *Token) GetStart() int64
- func (t *Token) GetStop() int64
- func (t *Token) IsAssignment() bool
- func (t *Token) IsBinary() bool
- func (t *Token) IsForByteArray() bool
- func (t *Token) IsIdentifier() bool
- func (t *Token) IsKeyword() bool
- func (t *Token) IsLiteralArrayToken() bool
- func (t *Token) IsLiteralToken() bool
- func (t *Token) IsSpecial() bool
- func (t *Token) SetStart(start int64)
- func (t *Token) TypeOfToken() string
- type TokenInterface
- type ValueToken
- type ValueTokenInterface
Constants ¶
View Source
const ( EOF = "#eof" ALPHABET = "#alphabetic" DIGIT = "#digit" BIN = "#binary" SPEC = "#special" SEPARATOR = "#separator" BOOLEAN = "boolean" NIL = "nil" STRING = "string" NUMBER = "number" IDENT = "identifier" SYMBOL = "symbol" ARRAY = "array" KEYWORD = "keyword" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AssignmentToken ¶
type AssignmentToken struct {
*Token
}
func (*AssignmentToken) IsAssignment ¶
func (t *AssignmentToken) IsAssignment() bool
type BinarySelectorToken ¶
type BinarySelectorToken struct {
*ValueToken
}
func NewBinarySelectorToken ¶
func NewBinarySelectorToken(start int64, value string) *BinarySelectorToken
func (*BinarySelectorToken) IsBinary ¶
func (t *BinarySelectorToken) IsBinary() bool
type IdentifierToken ¶
type IdentifierToken struct {
*ValueToken
}
func (*IdentifierToken) IsIdentifier ¶
func (i *IdentifierToken) IsIdentifier() bool
type KeywordToken ¶
type KeywordToken struct {
*ValueToken
}
func (*KeywordToken) IsKeyword ¶
func (k *KeywordToken) IsKeyword() bool
type LiteralArrayToken ¶
type LiteralArrayToken struct {
*ValueToken
}
func (*LiteralArrayToken) IsForByteArray ¶
func (t *LiteralArrayToken) IsForByteArray() bool
func (*LiteralArrayToken) IsLiteralArrayToken ¶
func (t *LiteralArrayToken) IsLiteralArrayToken() bool
type LiteralToken ¶
type LiteralToken struct { *ValueToken // contains filtered or unexported fields }
func NewLiteralToken ¶
func NewLiteralToken(start int64, stop int64, value string, valueType string) *LiteralToken
func (*LiteralToken) IsLiteralToken ¶
func (l *LiteralToken) IsLiteralToken() bool
func (*LiteralToken) IsMultiKeyword ¶
func (t *LiteralToken) IsMultiKeyword() bool
type LiteralTokenInterface ¶
type LiteralTokenInterface interface { ValueTokenInterface IsMultiKeyword() bool }
type MultiKeywordLiteralToken ¶
type MultiKeywordLiteralToken struct {
*LiteralToken
}
func (*MultiKeywordLiteralToken) IsMultiKeyword ¶
func (m *MultiKeywordLiteralToken) IsMultiKeyword() bool
type NumberLiteralToken ¶
type NumberLiteralToken struct {
*LiteralToken
}
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func New ¶
func New(input talkio.StringReader) *Scanner
func (*Scanner) Next ¶
func (s *Scanner) Next() (TokenInterface, error)
type SpecialCharacterToken ¶
type SpecialCharacterToken struct {
*ValueToken
}
func (*SpecialCharacterToken) IsSpecial ¶
func (s *SpecialCharacterToken) IsSpecial() bool
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
func (*Token) IsAssignment ¶
func (*Token) IsForByteArray ¶
func (*Token) IsIdentifier ¶
func (*Token) IsLiteralArrayToken ¶
func (*Token) IsLiteralToken ¶
func (*Token) TypeOfToken ¶
type TokenInterface ¶
type TokenInterface interface { TypeOfToken() string GetStart() int64 SetStart(int64) GetStop() int64 IsBinary() bool IsIdentifier() bool IsSpecial() bool IsAssignment() bool IsLiteralToken() bool IsLiteralArrayToken() bool IsKeyword() bool IsForByteArray() bool // contains filtered or unexported methods }
type ValueToken ¶
type ValueToken struct { *Token // contains filtered or unexported fields }
func (*ValueToken) SetValue ¶
func (t *ValueToken) SetValue(value string)
func (*ValueToken) TypeOfToken ¶
func (t *ValueToken) TypeOfToken() string
func (*ValueToken) ValueOfToken ¶
func (t *ValueToken) ValueOfToken() string
type ValueTokenInterface ¶
type ValueTokenInterface interface { TokenInterface ValueOfToken() string }
Click to show internal directories.
Click to hide internal directories.