A few basic expressions, no tests
This commit is contained in:
@@ -2,6 +2,18 @@ if
|
||||
: "if" "(" expression ")" expression ("else" expression)?
|
||||
;
|
||||
|
||||
try
|
||||
: "try" block catchBlock* finallyBlock?
|
||||
;
|
||||
|
||||
catchBlock
|
||||
: "catch" valueParameters block
|
||||
;
|
||||
|
||||
finallyBlock
|
||||
: "finally" block
|
||||
;
|
||||
|
||||
loop
|
||||
: for
|
||||
: while
|
||||
|
||||
@@ -11,7 +11,8 @@ expression
|
||||
: expressionWithPrecedences
|
||||
: match
|
||||
: if
|
||||
: "typeof" // TODO: another keyword
|
||||
: try
|
||||
: "typeof" "(" expression ")"
|
||||
: "new" constructorInvocation // TODO: Do we need "new"?, see factory methods
|
||||
: objectLiteral
|
||||
: declaration
|
||||
@@ -165,11 +166,11 @@ listLiteral
|
||||
;
|
||||
|
||||
mapLiteral
|
||||
: "[" mapEntryLiteral{","} "]"
|
||||
: "[" mapLiteralEntry{","} "]"
|
||||
: "[" ":" "]"
|
||||
;
|
||||
|
||||
mapEntryLiteral
|
||||
mapLiteralEntry
|
||||
: expression ":" expression
|
||||
;
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ do
|
||||
match
|
||||
out
|
||||
ref
|
||||
try
|
||||
|
||||
Soft:
|
||||
wraps -- in a class header
|
||||
@@ -79,4 +80,6 @@ private
|
||||
public
|
||||
internal
|
||||
protected
|
||||
catch
|
||||
finally
|
||||
*/
|
||||
Reference in New Issue
Block a user