Skip to content

Add grammar for readonly property modifier#264

Open
ghostwriter wants to merge 1 commit intophp:masterfrom
ghostwriter:feature/grammar/class-declaration/readonly-property-modifier
Open

Add grammar for readonly property modifier#264
ghostwriter wants to merge 1 commit intophp:masterfrom
ghostwriter:feature/grammar/class-declaration/readonly-property-modifier

Conversation

@ghostwriter
Copy link
Contributor

This patch adds the grammar for readonly property modifier, via the following changes:

  • Update spec/14-classes.md
  • Execute tools/pre-commit
diff --git a/spec/14-classes.md b/spec/14-classes.md

--- a/spec/14-classes.md
+++ b/spec/14-classes.md

property-modifier:
  'var'
-  visibility-modifier static-modifier?
-  static-modifier visibility-modifier?
+  visibility-modifier property-modifiers?
+  property-modifiers visibility-modifier?
+
+property-modifiers:
+  readonly-modifier
+  static-modifier
+
+readonly-modifier:
+  'readonly'

visibility-modifier:
  'public'

Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
@ghostwriter
Copy link
Contributor Author

or maybe, something like?

property-declaration:
 attributes? modifiers? types? property-elements ';'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant