-
Notifications
You must be signed in to change notification settings - Fork 100
for() syntax marked as error #249
Description
Hello, thanks for all your work;
I have the following DME: https://gist.github.com/warriorstar-orion/dc6091aa63d43742fe502c9eef8716eb
I maintain a branch of SpacemanDMM which, upon parsing an AST, serializes it to Protobuf (master...warriorstar-orion:pb2 to compare against master). Upon parsing the above DME and ingesting the protobuf in another program, I found that the parser doesn't appear to respect the for syntax with no arguments:
2021/02/25 12:55:21 0.00s parsing
2021/02/25 12:55:21 ===================
Invalid code block found:
invalid: true
invalid_description: "for-in-list must start with variable"
2021/02/25 12:55:21 ===================
Invalid code block found:
invalid: true
invalid_description: "for-in-list must start with variable"
Based on a read of the Designer's Guide and DM Reference, it appears this syntax is valid. The Designer's Guide uses a roughly equivalent example:
And the DM Reference suggests all three loop arguments may be omitted:
Am I holding it wrong or is parsing support for this missing here?
Thanks!
EDIT: I'll probably just switch to e.g. while(1) but leave this for posterity

