Versions in this module Expand all Collapse all v0 v0.1.0 May 27, 2025 Changes in this version + const Version + func Factorial(n int) int + func GCD(a, b int) int + func LCM(a, b int) int + type BinaryOpNode struct + Left Node + Op TokenType + Right Node + func (n *BinaryOpNode) Eval() float64 + type ConstNode struct + Name string + func (n *ConstNode) Eval() float64 + type FuncCallNode struct + Args []Node + Name string + func (n *FuncCallNode) Eval() float64 + type Lexer struct + func NewLexer(input string) *Lexer + func (l *Lexer) NextToken() Token + type Node interface + Eval func() float64 + type NumberNode struct + Value float64 + func (n *NumberNode) Eval() float64 + type Parser struct + func NewParser(input string) *Parser + func (p *Parser) Parse() Node + type Token struct + Type TokenType + Value string + func (t Token) String() string + type TokenType int + const TokenComma + const TokenDiv + const TokenEOF + const TokenIdent + const TokenLBrace + const TokenLBracket + const TokenLParen + const TokenMinus + const TokenMul + const TokenNumber + const TokenPlus + const TokenPow + const TokenRBrace + const TokenRBracket + const TokenRParen + type UnaryOpNode struct + Child Node + Op TokenType + func (n *UnaryOpNode) Eval() float64