afw-org / afw

Adaptive Framework
https://afw.tools
MIT License
4 stars 1 forks source link

Adaptive Script language changes #62

Open mike000000000 opened 1 year ago

mike000000000 commented 1 year ago

This issue and this top comment is a index of various Adaptive Script language changes that are needed. These changes can link to new issues to track particular changes when it helps or pushes can reference this issue. Additional comments in this issue can provide more detail.

  1. Most statements should not affect the result value. Some that can are 'return', 'break', and assignment statements (not ones with let or const).
  2. 'let' and 'const' should allow multiple variables to be declared and assigned values.
  3. The initializer of 'for' should be a single 'let', 'const', or assignment statement instead of what it is now.
  4. '=' assignments should be expressions so x = y = 1 should be allowed.
  5. Allow labels on loops, break, and continue. Do not allow it on blocks because that could cause a lot of programmer confusion.