mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-22 19:22:38 +01:00
27 lines
580 B
Go
27 lines
580 B
Go
|
package ast
|
||
|
|
||
|
import "github.com/d5/tengo/compiler/source"
|
||
|
|
||
|
// FloatLit represents a floating point literal.
|
||
|
type FloatLit struct {
|
||
|
Value float64
|
||
|
ValuePos source.Pos
|
||
|
Literal string
|
||
|
}
|
||
|
|
||
|
func (e *FloatLit) exprNode() {}
|
||
|
|
||
|
// Pos returns the position of first character belonging to the node.
|
||
|
func (e *FloatLit) Pos() source.Pos {
|
||
|
return e.ValuePos
|
||
|
}
|
||
|
|
||
|
// End returns the position of first character immediately after the node.
|
||
|
func (e *FloatLit) End() source.Pos {
|
||
|
return source.Pos(int(e.ValuePos) + len(e.Literal))
|
||
|
}
|
||
|
|
||
|
func (e *FloatLit) String() string {
|
||
|
return e.Literal
|
||
|
}
|