style: moved functions around

This commit is contained in:
2025-12-30 15:58:14 -05:00
parent 412d3924eb
commit 2499921679
10 changed files with 115 additions and 93 deletions

View File

@@ -0,0 +1,30 @@
package saccharine
type Statement interface {
IsStatement()
}
/** ------------------------------------------------------------------------- */
type LetStatement struct {
Name string
Parameters []string
Body Expression
}
type DeclareStatement struct {
Value Expression
}
func (LetStatement) IsStatement() {}
func (DeclareStatement) IsStatement() {}
/** ------------------------------------------------------------------------- */
func NewLet(name string, parameters []string, body Expression) *LetStatement {
return &LetStatement{Name: name, Parameters: parameters, Body: body}
}
func NewDeclare(value Expression) *DeclareStatement {
return &DeclareStatement{Value: value}
}