mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-29 14:12:02 -08:00
27 lines
564 B
Go
27 lines
564 B
Go
|
package ast
|
||
|
|
||
|
import "github.com/d5/tengo/compiler/source"
|
||
|
|
||
|
// BoolLit represents a boolean literal.
|
||
|
type BoolLit struct {
|
||
|
Value bool
|
||
|
ValuePos source.Pos
|
||
|
Literal string
|
||
|
}
|
||
|
|
||
|
func (e *BoolLit) exprNode() {}
|
||
|
|
||
|
// Pos returns the position of first character belonging to the node.
|
||
|
func (e *BoolLit) Pos() source.Pos {
|
||
|
return e.ValuePos
|
||
|
}
|
||
|
|
||
|
// End returns the position of first character immediately after the node.
|
||
|
func (e *BoolLit) End() source.Pos {
|
||
|
return source.Pos(int(e.ValuePos) + len(e.Literal))
|
||
|
}
|
||
|
|
||
|
func (e *BoolLit) String() string {
|
||
|
return e.Literal
|
||
|
}
|