Skip to content

Commit

Permalink
Merge pull request #258 from calebdw/asym_vis
Browse files Browse the repository at this point in the history
feat: add asymmetric property visibility (PHP 8.4)
  • Loading branch information
calebdw authored Oct 1, 2024
2 parents 74c6b0d + 53ae46a commit 3e96884
Show file tree
Hide file tree
Showing 8 changed files with 152,324 additions and 151,603 deletions.
15 changes: 11 additions & 4 deletions common/define-grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,17 @@ module.exports = function defineGrammar(dialect) {
),
),

visibility_modifier: _ => choice(
keyword('public'),
keyword('protected'),
keyword('private'),
visibility_modifier: $ => seq(
choice(
keyword('public'),
keyword('protected'),
keyword('private'),
),
optional(seq(
token.immediate('('),
alias($.name, $.operation),
token.immediate(')'),
)),
),

function_definition: $ => seq(
Expand Down
89 changes: 62 additions & 27 deletions php/src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion php/src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3e96884

Please sign in to comment.