Skip to content

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