Update php.ts #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "patch-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add magic constants
Add
selfkeywordsExtend list of keywords
Group variable types
Also need help with adding class constants
Many of these don't seem to actually be emitted by the parser. Defining a highlighting tag for a name that won't appear in the parse tree doesn't actually work.
@marijnh you mean many in this PR or at all?
In this PR.
@marijnh
I'm add only
selfkeywords and magic constants, in other cases I'm only append missed keywords. please, specify exactly what's wrong?These changes don't work, for things like
__CLASS__, as I'm sure you can confirm. The names in this context refer to syntax tree node names, so you can't just define new constants here.@marijnh ok, constants are removed. anything else?
Attached patch adds the ones that were missed. The others don't exist in the parser output.
@marijnh why
declare enddeclarenot in control keywords? whyeval isset empty die exit __halt_compilerdon't exist in the parser output?Oh, I see, they were already there in definition keywords, which seems a reasonable place for them as well. My patch actually adds them to control keywords.
Mostly because they didn't appear in the tree-sitter grammar our grammar is based on, which I guess is because you still get a reasonable parse even if you don't handle these specially.
Pull request closed