Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix apply statement parsing and ABNF #1414

Merged
merged 1 commit into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source-1.0/spec/core/idl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ string support defined in `RFC 5234 <https://www.rfc-editor.org/rfc/rfc7405>`_.
: *(`Comma` `TraitStructureKvp` *`WS`)
: `TrailingComma`
TraitStructureKvp :`NodeObjectKey` *`WS` ":" *`WS` `NodeValue`
ApplyStatement :%s"apply" `WS` `ShapeId` `WS` `Trait` `BR`
ApplyStatement :%s"apply" `SP` `ShapeId` `WS` `Trait` `BR`

.. rubric:: Shape ID

Expand Down
2 changes: 1 addition & 1 deletion docs/source-2.0/spec/idl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ string support defined in `RFC 5234 <https://www.rfc-editor.org/rfc/rfc7405>`_.
TraitStructure :`TraitStructureKvp` *(*`WS` `TraitStructureKvp`)
TraitStructureKvp :`NodeObjectKey` *`WS` ":" *`WS` `NodeValue`
ApplyStatement :(`ApplyStatementSingular` / `ApplyStatementBlock`)
ApplyStatementSingular :%s"apply" `WS` `ShapeId` `WS` `Trait` `BR`
ApplyStatementSingular :%s"apply" `SP` `ShapeId` `WS` `Trait` `BR`
ApplyStatementBlock :%s"apply" `SP` `ShapeId` `WS` "{" `TraitStatements` "}" `BR`

.. rubric:: Shape ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ private void parseApplyStatement() {
expect('p');
expect('l');
expect('y');
sp();
rsp();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too bad that the names of the methods have diverged from the name of the grammar productions, but that's not related to this change.


String name = ParserUtils.parseShapeId(this);
rws();
Expand Down