feat: no constructors for expressions and statements for saccharine
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package saccharine
|
||||
|
||||
type Statement interface {
|
||||
IsStatement()
|
||||
statement()
|
||||
}
|
||||
|
||||
/** ------------------------------------------------------------------------- */
|
||||
@@ -16,15 +16,5 @@ 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}
|
||||
}
|
||||
func (LetStatement) statement() {}
|
||||
func (DeclareStatement) statement() {}
|
||||
|
||||
Reference in New Issue
Block a user