Reorganized file structure
This commit is contained in:
parent
dbe0a67dc5
commit
ff0b8ecb10
7 changed files with 95 additions and 58 deletions
18
src/build/ast/Define.go
Normal file
18
src/build/ast/Define.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
package ast
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.akyoto.dev/cli/q/src/build/expression"
|
||||
"git.akyoto.dev/cli/q/src/build/token"
|
||||
)
|
||||
|
||||
// Define represents a variable definition.
|
||||
type Define struct {
|
||||
Value *expression.Expression
|
||||
Name token.Token
|
||||
}
|
||||
|
||||
func (node *Define) String() string {
|
||||
return fmt.Sprintf("(= %s %s)", node.Name.Text(), node.Value)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue