Reorganized file structure
This commit is contained in:
parent
dbe0a67dc5
commit
ff0b8ecb10
7 changed files with 95 additions and 58 deletions
17
src/build/ast/If.go
Normal file
17
src/build/ast/If.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package ast
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.akyoto.dev/cli/q/src/build/expression"
|
||||
)
|
||||
|
||||
// If represents an if statement.
|
||||
type If struct {
|
||||
Condition *expression.Expression
|
||||
Body AST
|
||||
}
|
||||
|
||||
func (node *If) String() string {
|
||||
return fmt.Sprintf("(if %s %s)", node.Condition, node.Body)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue