feat: copied code over
This commit is contained in:
31
pkg/repr/saccharine/statement.go
Normal file
31
pkg/repr/saccharine/statement.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package saccharine
|
||||
|
||||
import (
|
||||
"git.maximhutz.com/max/lambda/pkg/repr"
|
||||
)
|
||||
|
||||
type Statement interface {
|
||||
repr.Repr
|
||||
}
|
||||
|
||||
/** ------------------------------------------------------------------------- */
|
||||
|
||||
type LetStatement struct {
|
||||
Name string
|
||||
Parameters []string
|
||||
Body Expression
|
||||
}
|
||||
|
||||
func NewLet(name string, parameters []string, body Expression) *LetStatement {
|
||||
return &LetStatement{Name: name, Parameters: parameters, Body: body}
|
||||
}
|
||||
|
||||
/** ------------------------------------------------------------------------- */
|
||||
|
||||
type DeclareStatement struct {
|
||||
Value Expression
|
||||
}
|
||||
|
||||
func NewDeclare(value Expression) *DeclareStatement {
|
||||
return &DeclareStatement{Value: value}
|
||||
}
|
||||
Reference in New Issue
Block a user