| Age | Commit message (Collapse) | Author |
|
Branching control is delegated directly to the Next instruction,
which now takes the location of loop exit as first argument.
It avoids the use of JumpFalse, plus the stack storage for the
condition.
|
|
|
|
|
|
|
|
Mutating scanner tokens or reusing scanner token attributes to
store other metadata is a hack. Introduce a new parser token
type with arbitrary args. The next step will be to use the arg
field instead of scanner token fields.
|
|
- vm: added Pull, Next and Stop instructions, to implement iterators
- lang: add Range, Next and Stop tokens
- parser: handle range clause. Still naive and incomplete.
- comp: generate iterator instructions from range clause.
Work in progress. Only initial support for slices. Many more tests
and combinations needed, but the main pattern is there now.
|
|
|
|
Added 2 VM instructions, FnewE variant of Fnew with a dereference,
and FieldE, variant of Field with dereference.
It's now possible to pointers in structs and literal composites.
|
|
A new token MapAssign is added to implement assignements involving
a map, slice or array, an index key expression and a value expression.
|
|
|
|
|
|
|
|
The expressions were parsed from right to left, and it was incorrect and
cumbersome. Now they are processed from left to right, with a simpler
and correct handling of precedence rules.
The vm function call syntax has been changed to set the function
before the input arguments on the stack, as to follow the declaring
order in languages.
|
|
|
|
|
|
Added missing vm instructions to allocate a typed value on the stack
and to set a structure field.
It's possible now to generate struct literal composites for non
keyed struct fields.
|
|
|