Reverting conclusion of #1001 -- Throw should be able to be used as part of an expression.
This commit is contained in:
parent
2fb6d0beb9
commit
2c92904109
|
@ -30,11 +30,11 @@
|
|||
],
|
||||
Line: [o('Expression'), o('Statement')],
|
||||
Statement: [
|
||||
o('Return'), o('Throw'), o('Comment'), o('STATEMENT', function() {
|
||||
o('Return'), o('Comment'), o('STATEMENT', function() {
|
||||
return new Literal($1);
|
||||
})
|
||||
],
|
||||
Expression: [o('Value'), o('Invocation'), o('Code'), o('Operation'), o('Assign'), o('If'), o('Try'), o('While'), o('For'), o('Switch'), o('Class')],
|
||||
Expression: [o('Value'), o('Invocation'), o('Code'), o('Operation'), o('Assign'), o('If'), o('Try'), o('While'), o('For'), o('Switch'), o('Class'), o('Throw')],
|
||||
Block: [
|
||||
o('INDENT OUTDENT', function() {
|
||||
return new Block;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -77,7 +77,6 @@ grammar =
|
|||
# Pure statements which cannot be expressions.
|
||||
Statement: [
|
||||
o 'Return'
|
||||
o 'Throw'
|
||||
o 'Comment'
|
||||
o 'STATEMENT', -> new Literal $1
|
||||
]
|
||||
|
@ -98,6 +97,7 @@ grammar =
|
|||
o 'For'
|
||||
o 'Switch'
|
||||
o 'Class'
|
||||
o 'Throw'
|
||||
]
|
||||
|
||||
# An indented block of expressions. Note that the [Rewriter](rewriter.html)
|
||||
|
|
Loading…
Reference in New Issue