As the LexicalEnv.get method always return an array of root nodes
while the root node is defined in user code, we need to turn the Node
and LexicalEnv classes into generic traits and instantiate them using
the actual root node.
To make this works, root node declaration has to be changed from
`class FooNode : Node` to `class FooNode implements Node[FooNode]`,
which required to refactor a bit almost all the lkt tests.
On Windows, the default encoding (not UTF-8) may not allow non-ASCII
test outputs. Use Python's "ascii" builtin where needed to ensure pure
ASCII test outputs.
TN: U720-016
Python's -O command-line option disableds the execution of "assert"
statements. In order for the generated Python bindings to work in such a
mode, we need to keep assertion logic only in "assert" statements. This
commit fixes statements that currently don't respect this principle.
Fixes GitHub issue #485
TN: U326-020
- Allow just subclassing App.process_unit, by providing a default main
that iterates on units and calls process_unit on each
- Allow passing args to python App programmatically
Instead, compute them lazily from offset data.
This creates a slight breakage in the generated slocs for token with
negative spans. Since there is not much you could do with the end sloc
of a token with a negative span range before, this is considered a
minor breakage.