Implemented if statements
This commit is contained in:
parent
c139dced9e
commit
962a362578
16 changed files with 280 additions and 14 deletions
|
@ -37,6 +37,15 @@ func (node *Define) String() string {
|
|||
return fmt.Sprintf("(= %s %s)", node.Name.Text(), node.Value)
|
||||
}
|
||||
|
||||
type If struct {
|
||||
Condition *expression.Expression
|
||||
Body AST
|
||||
}
|
||||
|
||||
func (node *If) String() string {
|
||||
return fmt.Sprintf("(if %s %s)", node.Condition, node.Body)
|
||||
}
|
||||
|
||||
type Loop struct {
|
||||
Body AST
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue