Reorganized file structure

This commit is contained in:
Eduard Urbach 2024-07-11 12:04:51 +02:00
parent dbe0a67dc5
commit ff0b8ecb10
Signed by: eduard
GPG key ID: 49226B848C78F6C8
7 changed files with 95 additions and 58 deletions

17
src/build/ast/If.go Normal file
View 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)
}