Reorganized file structure

This commit is contained in:
2024-07-11 12:04:51 +02:00
parent c2401bf826
commit 7b18056006
7 changed files with 95 additions and 58 deletions

19
src/build/ast/Assign.go Normal file

@ -0,0 +1,19 @@
package ast
import (
"fmt"
"git.akyoto.dev/cli/q/src/build/expression"
"git.akyoto.dev/cli/q/src/build/token"
)
// Assign represents an assignment to an existing variable or memory location.
type Assign struct {
Value *expression.Expression
Name token.Token
Operator token.Token
}
func (node *Assign) String() string {
return fmt.Sprintf("(= %s %s)", node.Name.Text(), node.Value)
}