Skip to content

Commit 4eb1279

Browse files
committed
fix: terminal prevents expect and with from being keywords
1 parent f31f151 commit 4eb1279

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

app.hypermedia.testing.dsl/src/main/java/app/hypermedia/testing/dsl/Core.xtext

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,26 @@ ResponseStep:
1616
RepresentationStep:
1717
PropertyBlock |
1818
PropertyStatement;
19-
20-
terminal WITH_MODIFIER: 'With';
21-
terminal EXPECT_MODIFIER: 'Expect';
2219

2320
ClassBlock:
24-
WITH_MODIFIER 'Class' name=STRING '{'
21+
'With' 'Class' name=STRING '{'
2522
(children+=RepresentationStep)*
2623
hatch=HATCH?
2724
'}';
2825

2926
PropertyBlock:
30-
modifier=(WITH_MODIFIER | EXPECT_MODIFIER) 'Property' name=STRING '{'
27+
modifier=('With' | 'Expect') 'Property' name=STRING '{'
3128
(children+=RepresentationStep)*
3229
hatch=HATCH?
3330
'}'
3431
;
3532

3633
PropertyStatement:
37-
EXPECT_MODIFIER 'Property' name=STRING (value=STRING)?
34+
'Expect' 'Property' name=STRING (value=STRING)?
3835
;
3936

4037
StatusStatement:
41-
EXPECT_MODIFIER 'Status' status=INT
38+
'Expect' 'Status' status=INT
4239
;
4340

4441
terminal HATCH: '++' -> '++';

app.hypermedia.testing.dsl/src/main/java/app/hypermedia/testing/dsl/Hydra.xtext

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ RepresentationStep:
1919
;
2020

2121
RelaxedOperationBlock:
22-
WITH_MODIFIER 'Operation' name=STRING '{'
22+
'With' 'Operation' name=STRING '{'
2323
(invocations+=InvocationBlock)*
2424
'}'
2525
;
2626

2727
// TODO: Can we use only one step for this and restrict Expect Operation from being used on top level??
2828
OperationBlock:
29-
modifier=(WITH_MODIFIER | EXPECT_MODIFIER) 'Operation' name=STRING '{'
29+
modifier=('With' | 'Expect') 'Operation' name=STRING '{'
3030
(invocations+=InvocationBlock)*
3131
'}'
3232
;

0 commit comments

Comments
 (0)