Skip to content

Commit

Permalink
Changed commands to accept expressions by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexikos committed May 20, 2017
1 parent 5e4bc59 commit 4f8d55d
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 256 deletions.
4 changes: 3 additions & 1 deletion source/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,9 @@ enum enum_act {
, ACT_LOOP, ACT_LOOP_FILE, ACT_LOOP_REG, ACT_LOOP_READ, ACT_LOOP_PARSE
, ACT_FOR, ACT_WHILE, ACT_UNTIL // Keep LOOP, FOR, WHILE and UNTIL together and in this order for range checks in various places.
, ACT_BREAK, ACT_CONTINUE
, ACT_GOTO, ACT_GOSUB, ACT_RETURN
, ACT_GOTO, ACT_GOSUB
, ACT_FIRST_JUMP = ACT_BREAK, ACT_LAST_JUMP = ACT_GOSUB // Actions which accept a label name.
, ACT_RETURN
, ACT_TRY, ACT_CATCH, ACT_FINALLY, ACT_THROW // Keep TRY, CATCH and FINALLY together and in this order for range checks.
, ACT_FIRST_CONTROL_FLOW = ACT_BLOCK_BEGIN, ACT_LAST_CONTROL_FLOW = ACT_THROW
, ACT_FIRST_COMMAND, ACT_EXIT = ACT_FIRST_COMMAND, ACT_EXITAPP // Excluded from the "CONTROL_FLOW" range above because they can be safely wrapped into a Func.
Expand Down
8 changes: 4 additions & 4 deletions source/globaldata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@ Action g_act[] =
, {_T("If"), 1, 1, false, {1, 0}}
, {_T("Else"), 0, 0, false, NULL} // No args; it has special handling to support same-line ELSE-actions (e.g. "else if").
, {_T("Loop"), 0, 1, false, {1, 0}} // IterationCount
, {_T("LoopFiles"), 1, 2, false, NULL} // FilePattern [, Mode] -- LoopFiles vs LoopFile for clarity.
, {_T("LoopReg"), 1, 2, false, NULL} // Key [, Mode]
, {_T("LoopRead"), 1, 2, false, NULL} // InputFile [, OutputFile]
, {_T("LoopParse"), 1, 3, false, NULL} // InputVar [, Delimiters, OmitChars]
, {_T("LoopFiles"), 1, 2, false, {1, 2, 0}} // FilePattern [, Mode] -- LoopFiles vs LoopFile for clarity.
, {_T("LoopReg"), 1, 2, false, {1, 2, 0}} // Key [, Mode]
, {_T("LoopRead"), 1, 2, false, {1, 2, 0}} // InputFile [, OutputFile]
, {_T("LoopParse"), 1, 3, false, {1, 2, 3, 0}} // InputString [, Delimiters, OmitChars]
, {_T("For"), 1, 3, false, {3, 0}} // For var [,var] in expression
, {_T("While"), 1, 1, false, {1, 0}} // LoopCondition. v1.0.48: Lexikos: Added g_act entry for ACT_WHILE.
, {_T("Until"), 1, 1, false, {1, 0}} // Until expression (follows a Loop)
Expand Down
Loading

0 comments on commit 4f8d55d

Please sign in to comment.