From e0161c493867e788ad9db208247f3275e2d057dc Mon Sep 17 00:00:00 2001 From: Mel Date: Mon, 8 Aug 2022 23:11:23 +0000 Subject: Parse use and global statements --- pkg/lang/ast/stmt.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pkg/lang/ast') 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 -- cgit 1.4.1