optimizations
Some checks failed
Build / build (push) Successful in 9m47s
Publish Image / publish (push) Failing after 49s
Test / build (push) Failing after 6m19s

This commit is contained in:
Chuck Smith
2024-04-02 14:32:03 -04:00
parent 07fd82b261
commit 88e3330856
18 changed files with 510 additions and 31 deletions

View File

@@ -127,6 +127,7 @@ func (b *Boolean) expressionNode() {}
func (b *Boolean) TokenLiteral() string { return b.Token.Literal }
func (b *Boolean) String() string { return b.Token.Literal }
// IntegerLiteral represents a literal integer number and holds an int64 value
type IntegerLiteral struct {
Token token.Token
Value int64
@@ -136,6 +137,20 @@ func (il *IntegerLiteral) expressionNode() {}
func (il *IntegerLiteral) TokenLiteral() string { return il.Token.Literal }
func (il *IntegerLiteral) String() string { return il.Token.Literal }
// FloatLiteral represents a literal floating point number and holds an float64 value
type FloatLiteral struct {
Token token.Token
Value float64
}
func (fl *FloatLiteral) expressionNode() {}
// TokenLiteral prints the literal value of the token associated with this node
func (fl *FloatLiteral) TokenLiteral() string { return fl.Token.Literal }
// String returns a stringified version of the AST for debugging
func (fl *FloatLiteral) String() string { return fl.Token.Literal }
type PrefixExpression struct {
Token token.Token // The prefix token, e.g. !
Operator string