Reorganized file structure
This commit is contained in:
19
src/build/ast/Assign.go
Normal file
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)
|
||||
}
|
Reference in New Issue
Block a user