Switch to FunctionBody from plain Block, to allow function definitions.
This commit is contained in:
parent
879e2425b9
commit
7b26b4bf14
|
@ -13,13 +13,15 @@ Syndicate <: ES5 {
|
||||||
| AssertionTypeDeclarationStatement
|
| AssertionTypeDeclarationStatement
|
||||||
| SendMessageStatement
|
| SendMessageStatement
|
||||||
|
|
||||||
|
FunctionBodyBlock = "{" FunctionBody "}" // odd that this isn't in es5.ohm somewhere
|
||||||
|
|
||||||
ActorStatement
|
ActorStatement
|
||||||
= actor CallExpression Block -- withConstructor
|
= actor CallExpression FunctionBodyBlock -- withConstructor
|
||||||
| actor Block -- noConstructor
|
| actor FunctionBodyBlock -- noConstructor
|
||||||
|
|
||||||
DataspaceStatement
|
DataspaceStatement
|
||||||
= ground dataspace identifier? Block -- ground
|
= ground dataspace identifier? FunctionBodyBlock -- ground
|
||||||
| dataspace Block -- normal
|
| dataspace FunctionBodyBlock -- normal
|
||||||
|
|
||||||
ActorFacetStatement
|
ActorFacetStatement
|
||||||
= react FacetBlock until FacetStateTransitionBlock -- state
|
= react FacetBlock until FacetStateTransitionBlock -- state
|
||||||
|
@ -37,12 +39,12 @@ Syndicate <: ES5 {
|
||||||
FacetBlock = "{" FacetInitBlock? FacetSituation* FacetDoneBlock? "}"
|
FacetBlock = "{" FacetInitBlock? FacetSituation* FacetDoneBlock? "}"
|
||||||
FacetStateTransitionBlock = "{" FacetStateTransition* "}"
|
FacetStateTransitionBlock = "{" FacetStateTransition* "}"
|
||||||
|
|
||||||
FacetInitBlock = do Block
|
FacetInitBlock = do FunctionBodyBlock
|
||||||
FacetDoneBlock = finally Block
|
FacetDoneBlock = finally FunctionBodyBlock
|
||||||
|
|
||||||
FacetSituation
|
FacetSituation
|
||||||
= assert FacetPattern AssertWhenClause? #(sc) -- assert
|
= assert FacetPattern AssertWhenClause? #(sc) -- assert
|
||||||
| on FacetEventPattern Block -- event
|
| on FacetEventPattern FunctionBodyBlock -- event
|
||||||
| during FacetPattern FacetBlock -- during
|
| during FacetPattern FacetBlock -- during
|
||||||
|
|
||||||
AssertWhenClause = when "(" Expression<withIn> ")"
|
AssertWhenClause = when "(" Expression<withIn> ")"
|
||||||
|
@ -57,8 +59,8 @@ Syndicate <: ES5 {
|
||||||
| "(" Expression<withIn> ")" -- risingEdge
|
| "(" Expression<withIn> ")" -- risingEdge
|
||||||
|
|
||||||
FacetStateTransition
|
FacetStateTransition
|
||||||
= case FacetTransitionEventPattern Block -- withContinuation
|
= case FacetTransitionEventPattern FunctionBodyBlock -- withContinuation
|
||||||
| case FacetTransitionEventPattern #(sc) -- noContinuation
|
| case FacetTransitionEventPattern #(sc) -- noContinuation
|
||||||
|
|
||||||
FacetPattern
|
FacetPattern
|
||||||
= LeftHandSideExpression metalevel decimalIntegerLiteral -- withMetalevel
|
= LeftHandSideExpression metalevel decimalIntegerLiteral -- withMetalevel
|
||||||
|
|
Loading…
Reference in New Issue