diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-09-13 21:38:25 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-09-13 21:38:25 +0200 |
commit | f2c5937fdfe0331790fc4c7a64c9df0b8d56c705 (patch) | |
tree | a19bc2ff1469b4c0e11849d73dd9c8fdd621721e /ast.h | |
parent | dd67e7b992ded6b02a1c476f79fd9dc948d45730 (diff) |
syntax: fix for() loop quirks and variable scoping
- Support `for (var x in ...)` syntax
- Support `for (var i = 0; i < ...; i++)` syntax
- Properly handle "for" loops without condition and increment expression
- Reject for-in loops with invalid lhs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'ast.h')
-rw-r--r-- | ast.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -56,6 +56,7 @@ struct ut_op { uint16_t is_op:1; uint16_t is_overflow:1; uint16_t is_postfix:1; + uint16_t is_for_in:1; uint32_t off; struct json_object *val; union { |