Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BracketType ¶
type BracketType int
const ( LexGroup BracketType = iota LexOptional LexZeroOrMore LexOneOrMore )
type CharLiteral ¶
type CharLiteral struct { Literal []rune // contains filtered or unexported fields }
func CharLitFromStringLit ¶
func CharLitFromStringLit(sl *StringLit, i int, escaped bool) *CharLiteral
CharLitFromStringLit returns a dummy CharLiteral with Literal sl.Literal[i] If escaped sl.Literal[i] == '\\' and sl.Literal[i+1] is the escaped char.
func NewCharLiteral ¶
func NewCharLiteral(tok *token.Token, literal []rune) *CharLiteral
func (*CharLiteral) Char ¶
func (c *CharLiteral) Char() rune
func (*CharLiteral) Equal ¶
func (c *CharLiteral) Equal(other LexBase) bool
func (*CharLiteral) Lext ¶
func (c *CharLiteral) Lext() int
func (*CharLiteral) String ¶
func (c *CharLiteral) String() string
type LexBracket ¶
type LexBracket struct { Type BracketType Alternates []*RegExp // contains filtered or unexported fields }
func (*LexBracket) LeftBracket ¶
func (l *LexBracket) LeftBracket() string
func (*LexBracket) Lext ¶
func (b *LexBracket) Lext() int
func (*LexBracket) RightBracket ¶
func (l *LexBracket) RightBracket() string
func (*LexBracket) String ¶
func (lb *LexBracket) String() string
type StringLit ¶
type StringLit struct {
// contains filtered or unexported fields
}
func (*StringLit) ContainsWhiteSpace ¶
type UnicodeClass ¶
type UnicodeClass struct { Type UnicodeClassType // contains filtered or unexported fields }
func (*UnicodeClass) Equal ¶
func (u *UnicodeClass) Equal(other LexBase) bool
func (*UnicodeClass) Lext ¶
func (u *UnicodeClass) Lext() int
func (*UnicodeClass) String ¶
func (u *UnicodeClass) String() string
type UnicodeClassType ¶
type UnicodeClassType int
const ( Letter UnicodeClassType = iota Upcase Lowcase Number Space )
Click to show internal directories.
Click to hide internal directories.