about summary refs log tree commit diff
path: root/pkg/lang/ast
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-08-08 23:11:23 +0000
committerMel <einebeere@gmail.com>2022-08-08 23:45:16 +0000
commite0161c493867e788ad9db208247f3275e2d057dc (patch)
tree078807561155927ee40b0fc0fde011b49e859b87 /pkg/lang/ast
parent5a6d4664e4417763b4a7d9f215e42102fa1b3fd4 (diff)
downloadjinx-e0161c493867e788ad9db208247f3275e2d057dc.tar.zst
jinx-e0161c493867e788ad9db208247f3275e2d057dc.zip
Parse use and global statements
Diffstat (limited to 'pkg/lang/ast')
-rw-r--r--pkg/lang/ast/stmt.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/lang/ast/stmt.go b/pkg/lang/ast/stmt.go
index 7545bee..5b17851 100644
--- a/pkg/lang/ast/stmt.go
+++ b/pkg/lang/ast/stmt.go
@@ -7,6 +7,7 @@ type StmtKind int
 const (
 	StmtKindEmpty StmtKind = iota
 	StmtKindUse
+	StmtKindGlobal
 	StmtKindFnDecl
 	StmtKindTypeDecl
 	StmtKindVarDecl
@@ -31,10 +32,14 @@ type StmtT[T any] struct {
 
 type StmtUse struct {
 	Globals []IdentNode
-	Modules []IdentNode
+	Module IdentNode
 	Author  IdentNode
 }
 
+type StmtGlobal struct {
+	Name IdentNode
+}
+
 type StmtFnDecl struct {
 	Name IdentNode
 	Args []IdentNode