diff options
Diffstat (limited to 'pkg/lang/vm/text/errors.go')
| -rw-r--r-- | pkg/lang/vm/text/errors.go | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/pkg/lang/vm/text/errors.go b/pkg/lang/vm/text/errors.go new file mode 100644 index 0000000..a734a61 --- /dev/null +++ b/pkg/lang/vm/text/errors.go @@ -0,0 +1,33 @@ +package text + +type ErrInvalidValue struct { + Value string +} + +func (e ErrInvalidValue) Error() string { + return "invalid value: " + e.Value +} + +type ErrDuplicateLabel struct { + Label string +} + +func (e ErrDuplicateLabel) Error() string { + return "duplicate label: " + e.Label +} + +type ErrUnkonwnLabel struct { + Label string +} + +func (e ErrUnkonwnLabel) Error() string { + return "unknown label: " + e.Label +} + +type ErrUnknownOp struct { + Op string +} + +func (e ErrUnknownOp) Error() string { + return "unknown op: " + e.Op +} |
