aboutsummaryrefslogtreecommitdiff
path: root/pkg/lang/ast
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/lang/ast')
-rw-r--r--pkg/lang/ast/expr.go4
-rw-r--r--pkg/lang/ast/nodes.go8
-rw-r--r--pkg/lang/ast/stmt.go4
3 files changed, 8 insertions, 8 deletions
diff --git a/pkg/lang/ast/expr.go b/pkg/lang/ast/expr.go
index ab6578a..f98f9b3 100644
--- a/pkg/lang/ast/expr.go
+++ b/pkg/lang/ast/expr.go
@@ -1,6 +1,6 @@
package ast
-import "jinx/pkg/lang/scanner/token"
+import "jinx/pkg/libs/source"
type ExprKind int
@@ -25,7 +25,7 @@ const (
type Expr ExprT[any]
type ExprT[T any] struct {
- At token.Loc
+ At source.Loc
Kind ExprKind
Value T
}
diff --git a/pkg/lang/ast/nodes.go b/pkg/lang/ast/nodes.go
index 55dbb5b..117d8bf 100644
--- a/pkg/lang/ast/nodes.go
+++ b/pkg/lang/ast/nodes.go
@@ -1,19 +1,19 @@
package ast
-import "jinx/pkg/lang/scanner/token"
+import "jinx/pkg/libs/source"
type IdentNode struct {
- At token.Loc
+ At source.Loc
Value string
}
type BlockNode struct {
- At token.Loc
+ At source.Loc
Stmts []Stmt
}
type CondNode struct {
- At token.Loc
+ At source.Loc
Cond Expr
Then BlockNode
}
diff --git a/pkg/lang/ast/stmt.go b/pkg/lang/ast/stmt.go
index 4f24cc5..e25dee9 100644
--- a/pkg/lang/ast/stmt.go
+++ b/pkg/lang/ast/stmt.go
@@ -1,6 +1,6 @@
package ast
-import "jinx/pkg/lang/scanner/token"
+import "jinx/pkg/libs/source"
type StmtKind int
@@ -22,7 +22,7 @@ const (
type Stmt StmtT[any]
type StmtT[T any] struct {
- At token.Loc
+ At source.Loc
Kind StmtKind
Value T
}