Skip to content

Remove unreachable 'declarations' grammar production #188

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

Merged
merged 2 commits into from
Oct 20, 2023
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
16 changes: 0 additions & 16 deletions TSPL.docc/ReferenceManual/Declarations.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ the term *declaration* covers both declarations and definitions.
> *declaration* → *macro-declaration* \
> *declaration* → *operator-declaration* \
> *declaration* → *precedence-group-declaration* \
> *declarations* → *declaration* *declarations*_?_

## Top-Level Code

Expand Down Expand Up @@ -1807,21 +1806,6 @@ as described in <doc:Patterns#Enumeration-Case-Pattern>.
and they behave differently.
-->

<!--
old-grammar
Grammar of an enumeration declaration

enum-declaration -> attribute-list-OPT ``enum`` enum-name generic-parameter-clause-OPT type-inheritance-clause-OPT enum-body
enum-name -> identifier
enum-body -> ``{`` declarations-OPT ``}``

enum-member-declaration -> attribute-list-OPT ``case`` enumerator-list
enumerator-list -> enumerator raw-value-assignment-OPT | enumerator raw-value-assignment-OPT ``,`` enumerator-list
enumerator -> enumerator-name tuple-type-OPT
enumerator-name -> identifier
raw-value-assignment -> ``=`` literal
-->

## Structure Declaration

A *structure declaration* introduces a named structure type into your program.
Expand Down
1 change: 0 additions & 1 deletion TSPL.docc/ReferenceManual/SummaryOfTheGrammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,6 @@ make the same change here also.
> *declaration* → *subscript-declaration* \
> *declaration* → *operator-declaration* \
> *declaration* → *precedence-group-declaration* \
> *declarations* → *declaration* *declarations*_?_

> Grammar of a top-level declaration:
>
Expand Down