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

feat: support php 8.4 and other improvements #247

Merged
merged 16 commits into from
Aug 17, 2024
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
396 changes: 191 additions & 205 deletions common/define-grammar.js

Large diffs are not rendered by default.

1,960 changes: 989 additions & 971 deletions php/src/grammar.json

Large diffs are not rendered by default.

418 changes: 303 additions & 115 deletions php/src/node-types.json

Large diffs are not rendered by default.

202,624 changes: 101,776 additions & 100,848 deletions php/src/parser.c

Large diffs are not rendered by default.

1,960 changes: 989 additions & 971 deletions php_only/src/grammar.json

Large diffs are not rendered by default.

418 changes: 303 additions & 115 deletions php_only/src/node-types.json

Large diffs are not rendered by default.

195,841 changes: 97,420 additions & 98,421 deletions php_only/src/parser.c

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions queries/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,41 @@
(yield_expression "from" @keyword)
(function_static_declaration "static" @keyword)

; Namespace

(namespace_definition
name: (namespace_name
(name) @module))

(namespace_name
(name) @module)

(namespace_use_clause
[
(name) @type
(qualified_name
(name) @type)
alias: (name) @type
])

(namespace_use_clause
type: "function"
[
(name) @function
(qualified_name
(name) @function)
alias: (name) @function
])

(namespace_use_clause
type: "const"
[
(name) @constant
(qualified_name
(name) @constant)
alias: (name) @constant
])

; Variables

(relative_scope) @variable.builtin
Expand Down
Loading