summaryrefslogtreecommitdiff
path: root/symbol
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2026-01-16 12:30:31 +0100
committerMarc Vertes <mvertes@free.fr>2026-01-16 12:30:31 +0100
commitee9397bc031dc33e4f735b3331643bbf60a0d17a (patch)
tree42087d58e916904af3e70de6171e0f1c9c894d8f /symbol
parent31e3793202402fda21905027c18ebfa5c8d8c832 (diff)
feat: handle slice expressions
Diffstat (limited to 'symbol')
-rw-r--r--symbol/symbol.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/symbol/symbol.go b/symbol/symbol.go
index 5e8610a..8f261e3 100644
--- a/symbol/symbol.go
+++ b/symbol/symbol.go
@@ -60,6 +60,9 @@ func (s *Symbol) IsFunc() bool { return s.Kind == Func }
// IsPtr returns true if symbol is a pointer.
func (s *Symbol) IsPtr() bool { return s.Type.Rtype.Kind() == reflect.Pointer }
+// IsInt returns true if symbol is an int.
+func (s *Symbol) IsInt() bool { return s.Type.Rtype.Kind() == reflect.Int }
+
// Vtype returns the VM type of a symbol.
func Vtype(s *Symbol) *vm.Type {
if s.Type != nil {