Commit Graph

5 Commits

Author SHA1 Message Date
aarzilli
ff3e2344c4 proc/eval: Support type casts between basic types 2015-12-15 15:18:52 -08:00
aarzilli
e45443b3c4 proc/eval: Return an error when slicing a map over its length
Fixes #288
2015-11-07 11:48:40 +01:00
aarzilli
943c12030a proc/variables: map types support
Use m[n:] to skip the first n keys of a map
Map indexing is implemented with a linear scan

Implements #61, #122
2015-11-06 17:01:38 -08:00
aarzilli
988d529e91 proc/variables: Support chan types
Pretty print will print them with the format:
chan <element type> <queued elements>/<queue size>
2015-11-06 17:01:38 -08:00
aarzilli
43b64ec39e proc: Implements expression interpreter
Supported operators:

- All (binary and unary) operators between basic types except <-,
++ and -- (includes & to take the address of an expression)
- Comparison operators between supported compound types
- Typecast of integer constants into pointer types
- struct members
- indexing of arrays, slices and strings
- slicing of arrays, slices and strings
- pointer dereferencing
- true, false and nil constants

Implements #116, #117 and #251
2015-11-04 12:28:48 +01:00