-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix parsing record fields with .piq-positional
See allow_omit_label_invalid.piq for details
- Loading branch information
Showing
4 changed files
with
90 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
:piqi [ | ||
.module m | ||
|
||
.record [ | ||
.name r | ||
|
||
.field [ | ||
.name f | ||
.type v | ||
.piq-positional true | ||
] | ||
] | ||
|
||
.variant [ | ||
.name v | ||
|
||
.option [ | ||
.piq-alias oo | ||
.type string | ||
] | ||
] | ||
] | ||
|
||
:m/r [ | ||
% this is invalid, because there is .piq-alias in option definition | ||
"foo" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
:piqi [ | ||
.module m | ||
|
||
.record [ | ||
.name r | ||
|
||
.field [ | ||
.name f | ||
.type v | ||
.piq-positional true | ||
] | ||
] | ||
|
||
.record [ | ||
.name rr | ||
|
||
.field [ | ||
.name f | ||
.type vv | ||
.piq-positional true | ||
] | ||
] | ||
|
||
.variant [ | ||
.name v | ||
|
||
.option [ | ||
.piq-alias oo | ||
.type string | ||
] | ||
] | ||
|
||
.variant [ | ||
.name vv | ||
|
||
.option [ | ||
.type string | ||
] | ||
] | ||
] | ||
|
||
:m/r [ | ||
% this is valid, because of .piq-positional | ||
.oo "foo" | ||
] | ||
|
||
:m/rr [ | ||
% this is valid, because of a) .piq-positional and b) there is no .name nor .piq-alias in option definition | ||
"foo" | ||
] |