Skip to content

Commit

Permalink
Added keywords 'EndSelect' and 'EndTry'
Browse files Browse the repository at this point in the history
Signed-off-by: D-a-n-i-l-o <D-a-n-i-l-o@users.noreply.github.com>
  • Loading branch information
D-a-n-i-l-o committed May 16, 2021
1 parent c9fab5d commit 87223e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions src/wake/parser.wx
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ Class Parser
For Local decl:=Eachin decls
stmts.Push( New VarDeclStmtExpr( Cast<VarDecl>(decl),decl.srcpos,decl.endpos ) )
Next
Case "end","endif","wend","next","until","forever","else","elseif","setter","getter","case","default","catch"
Case "end","endif","endselect","endtry","wend","next","until","forever","else","elseif","setter","getter","case","default","catch"
Exit
Default
Try
Expand Down Expand Up @@ -1108,8 +1108,7 @@ Class Parser
Endif

Try
Parse( "end" )
CParse( "select" )
If CParse( "end" ) CParse( "select" ) Else Parse( "endselect" )
ParseEol()
Catch ex:ParseEx
SkipToNextLine()
Expand Down Expand Up @@ -1165,8 +1164,7 @@ Class Parser

Try

Parse( "end" )
CParse( "try" )
If CParse( "end" ) CParse( "try" ) Else Parse( "endtry" )
ParseEol()

Catch ex:ParseEx
Expand Down
4 changes: 2 additions & 2 deletions src/wake/toker.wx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Function InitToker:Void()
keyWords+="While;Wend;"
keyWords+="Repeat;Until;Forever;"
keyWords+="For;To;Step;Next;"
keyWords+="Select;Case;Default;"
keyWords+="Try;Catch;Throw;Throwable;Variant;CString;WString;TypeInfo;Typeof;"
keyWords+="Select;Case;Default;EndSelect;"
keyWords+="Try;Catch;EndTry;Throw;Throwable;Variant;CString;WString;TypeInfo;Typeof;"
keyWords+="Return;Print;Static;Cast;"
keyWords+="Extension;Protocol;Finalize;Delete"

Expand Down

0 comments on commit 87223e6

Please sign in to comment.