Documentation ¶
Index ¶
- Variables
- type BaseToken
- type CommentToken
- func (t *CommentToken) GetLineNumber() int
- func (t *CommentToken) GetNumber() (interface{}, error)
- func (t *CommentToken) GetText() (string, error)
- func (t *CommentToken) IsIdentifier() bool
- func (t *CommentToken) IsNumber() bool
- func (t *CommentToken) IsString() bool
- func (t *CommentToken) String() string
- type FloatToken
- type IdentifierToken
- func (t *IdentifierToken) GetLineNumber() int
- func (t *IdentifierToken) GetNumber() (interface{}, error)
- func (t *IdentifierToken) GetText() (string, error)
- func (t *IdentifierToken) IsIdentifier() bool
- func (t *IdentifierToken) IsNumber() bool
- func (t *IdentifierToken) IsString() bool
- func (t *IdentifierToken) String() string
- type NumberToken
- func (t *NumberToken) GetLineNumber() int
- func (t *NumberToken) GetNumber() (interface{}, error)
- func (t *NumberToken) GetText() (string, error)
- func (t *NumberToken) IsIdentifier() bool
- func (t *NumberToken) IsNumber() bool
- func (t *NumberToken) IsString() bool
- func (t *NumberToken) String() string
- type StringToken
- func (t *StringToken) GetLineNumber() int
- func (t *StringToken) GetNumber() (interface{}, error)
- func (t *StringToken) GetText() (string, error)
- func (t *StringToken) IsIdentifier() bool
- func (t *StringToken) IsNumber() bool
- func (t *StringToken) IsString() bool
- func (t *StringToken) String() string
- type Token
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EOF = NewBaseToken(-1) EOL = "\\n" NULL = "" )
Functions ¶
This section is empty.
Types ¶
type BaseToken ¶
type BaseToken struct {
// contains filtered or unexported fields
}
func NewBaseToken ¶
func (*BaseToken) GetLineNumber ¶
func (*BaseToken) IsIdentifier ¶
type CommentToken ¶
type CommentToken struct {
// contains filtered or unexported fields
}
func NewCommentToken ¶
func NewCommentToken(line int, comment string) *CommentToken
func (*CommentToken) GetLineNumber ¶
func (t *CommentToken) GetLineNumber() int
func (*CommentToken) GetNumber ¶
func (t *CommentToken) GetNumber() (interface{}, error)
func (*CommentToken) GetText ¶
func (t *CommentToken) GetText() (string, error)
func (*CommentToken) IsIdentifier ¶
func (t *CommentToken) IsIdentifier() bool
func (*CommentToken) IsNumber ¶
func (t *CommentToken) IsNumber() bool
func (*CommentToken) IsString ¶
func (t *CommentToken) IsString() bool
func (*CommentToken) String ¶
func (t *CommentToken) String() string
type FloatToken ¶
type FloatToken struct {
// contains filtered or unexported fields
}
func NewFloatToken ¶
func NewFloatToken(line int, v float64) *FloatToken
func (*FloatToken) GetLineNumber ¶
func (f *FloatToken) GetLineNumber() int
func (*FloatToken) GetNumber ¶
func (f *FloatToken) GetNumber() (interface{}, error)
func (*FloatToken) GetText ¶
func (f *FloatToken) GetText() (string, error)
func (*FloatToken) IsIdentifier ¶
func (f *FloatToken) IsIdentifier() bool
func (*FloatToken) IsNumber ¶
func (f *FloatToken) IsNumber() bool
func (*FloatToken) IsString ¶
func (f *FloatToken) IsString() bool
func (*FloatToken) String ¶
func (f *FloatToken) String() string
type IdentifierToken ¶
type IdentifierToken struct {
// contains filtered or unexported fields
}
func NewIdentifierToken ¶
func NewIdentifierToken(line int, t string) *IdentifierToken
func (*IdentifierToken) GetLineNumber ¶
func (t *IdentifierToken) GetLineNumber() int
func (*IdentifierToken) GetNumber ¶
func (t *IdentifierToken) GetNumber() (interface{}, error)
func (*IdentifierToken) GetText ¶
func (t *IdentifierToken) GetText() (string, error)
func (*IdentifierToken) IsIdentifier ¶
func (t *IdentifierToken) IsIdentifier() bool
func (*IdentifierToken) IsNumber ¶
func (t *IdentifierToken) IsNumber() bool
func (*IdentifierToken) IsString ¶
func (t *IdentifierToken) IsString() bool
func (*IdentifierToken) String ¶
func (t *IdentifierToken) String() string
type NumberToken ¶
type NumberToken struct {
// contains filtered or unexported fields
}
func NewNumberToken ¶
func NewNumberToken(line int, v int) *NumberToken
func (*NumberToken) GetLineNumber ¶
func (t *NumberToken) GetLineNumber() int
func (*NumberToken) GetNumber ¶
func (t *NumberToken) GetNumber() (interface{}, error)
func (*NumberToken) GetText ¶
func (t *NumberToken) GetText() (string, error)
func (*NumberToken) IsIdentifier ¶
func (t *NumberToken) IsIdentifier() bool
func (*NumberToken) IsNumber ¶
func (t *NumberToken) IsNumber() bool
func (*NumberToken) IsString ¶
func (t *NumberToken) IsString() bool
func (*NumberToken) String ¶
func (t *NumberToken) String() string
type StringToken ¶
type StringToken struct {
// contains filtered or unexported fields
}
func NewStringToken ¶
func NewStringToken(line int, s string) *StringToken
func (*StringToken) GetLineNumber ¶
func (t *StringToken) GetLineNumber() int
func (*StringToken) GetNumber ¶
func (t *StringToken) GetNumber() (interface{}, error)
func (*StringToken) GetText ¶
func (t *StringToken) GetText() (string, error)
func (*StringToken) IsIdentifier ¶
func (t *StringToken) IsIdentifier() bool
func (*StringToken) IsNumber ¶
func (t *StringToken) IsNumber() bool
func (*StringToken) IsString ¶
func (t *StringToken) IsString() bool
func (*StringToken) String ¶
func (t *StringToken) String() string
Click to show internal directories.
Click to hide internal directories.