py/parse: In strict mode, leave "const(expr)" node in tree.
The const "call" node will be processed by compiler, to create a const
namespace slot based on it.
(An alternative way would be to use variable annotations, e.g.
"var: const = 1". Support both ways for now.)
@@ -803,8 +803,10 @@ STATIC bool fold_constants(parser_t *parser, uint8_t rule_id, size_t num_args) {
} // is_int
// replace const(value) with value
+ if (!mp_strict_mode) {
pop_result(parser);
push_result_node(parser, pn_value);
+ }
// finished folding this assignment, but we still want it to be part of the tree
return false;
