feat: expression
This commit is contained in:
28
pkg/saccharine/ast/statement.go
Normal file
28
pkg/saccharine/ast/statement.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package ast
|
||||
|
||||
type Statement interface {
|
||||
IsStatement()
|
||||
}
|
||||
|
||||
/** ------------------------------------------------------------------------- */
|
||||
|
||||
type LetStatement struct {
|
||||
Variable string
|
||||
Value Expression
|
||||
}
|
||||
|
||||
type MethodStatement struct {
|
||||
Name string
|
||||
Parameters []string
|
||||
Body Expression
|
||||
}
|
||||
|
||||
type DeclareStatement struct {
|
||||
Value Expression
|
||||
}
|
||||
|
||||
func (LetStatement) IsStatement() {}
|
||||
func (MethodStatement) IsStatement() {}
|
||||
func (DeclareStatement) IsStatement() {}
|
||||
|
||||
/** ------------------------------------------------------------------------- */
|
||||
Reference in New Issue
Block a user