diff options
Diffstat (limited to 'symbol/symbol.go')
| -rw-r--r-- | symbol/symbol.go | 3 |
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 { |
