xgo/ast/char_lit.go
2019-01-11 01:16:34 -08:00

23 lines
369 B
Go

package ast
import "github.com/d5/tengo/source"
type CharLit struct {
Value rune
ValuePos source.Pos
Literal string
}
func (e *CharLit) exprNode() {}
func (e *CharLit) Pos() source.Pos {
return e.ValuePos
}
func (e *CharLit) End() source.Pos {
return source.Pos(int(e.ValuePos) + len(e.Literal))
}
func (e *CharLit) String() string {
return e.Literal
}