Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Add more syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben3eeE committed Oct 15, 2018
1 parent bc9eda8 commit f792eb9
Showing 1 changed file with 65 additions and 2 deletions.
67 changes: 65 additions & 2 deletions grammars/tree-sitter-php.cson
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ folds: [

scopes:
'"echo"': 'support.function'
'"print"': 'support.function'
'"unset"': 'support.function'
'"isset"': 'support.function'
'"list"': 'support.function'
'"eval"': 'support.function'
'"array"': 'support.function'
'"list"': 'support.function'
'"empty"': 'support.function'
'string': 'string.quoted'
'float': 'constant.numeric'

Expand All @@ -33,9 +41,11 @@ scopes:
'program': 'source.php'
'ERROR': 'syntax-error'

'class_declaration > name': 'entity.name.type.class'
'class_base_clause > qualified_name > name': 'entity.other.inherited-class'

'class_declaration > name': 'support.storage.type'
'class_base_clause > qualified_name > name': 'storage.modifier.extends.php'
'interface_declaration > name': 'entity.name.type.interface'
'class_interface_clause > qualified_name > name': 'entity.other.implemented-interface'

'function_definition > name': 'entity.name.function'
'function_call_expression > name': 'entity.name.function'
Expand Down Expand Up @@ -64,14 +74,63 @@ scopes:
'"public"': 'storage.modifier'
'"private"': 'storage.modifier'
'"protected"': 'storage.modifier'
'"global"': 'storage.modifier'
'"const"': 'storage.modifier'
'"abstract"': 'storage.modifier.abstract'
'"extends"': 'storage.modifier.extends'
'"implements"': 'storage.modifier.implements'
'"final"': 'storage.modifier.final'
'"use"': 'keyword.other.use'
'"namespace"': 'keyword.other.namespace'
'"callable"': 'storage.type'
'"var"': 'storage.type'
'"trait"': 'storage.type.trait'
'"class"': 'storage.type.class'
'"interface"': 'storage.type.interface'
'"function"': 'storage.type.function'
'"type"': 'storage.type.type'
'cast_expression > cast_type': 'storage.type.cast'

'"+"': 'keyword.operator'
'"-"': 'keyword.operator'
'"*"': 'keyword.operator'
'"/"': 'keyword.operator'
'"%"': 'keyword.operator'
'"**"': 'keyword.operator'
'"=="': 'keyword.operator'
'"==="': 'keyword.operator'
'"!="': 'keyword.operator'
'"!="': 'keyword.operator'
'"!=="': 'keyword.operator'
'"<"': 'keyword.operator'
'">"': 'keyword.operator'
'"<>"': 'keyword.operator'
'"<="': 'keyword.operator'
'">="': 'keyword.operator'
'"<=>"': 'keyword.operator'
'"&"': 'keyword.operator'
'"|"': 'keyword.operator'
'"^"': 'keyword.operator'
'"~"': 'keyword.opeator'
'"<<"': 'keyword.operator'
'">>"': 'keyword.operator'
'"++"': 'keyword.operator'
'"--"': 'keyword.operator'
'"and"': 'keyword.operator'
'"or"': 'keyword.operator'
'"xor"': 'keyword.operator'
'"!"': 'keyword.operator'
'"&&"': 'keyword.operator'
'"||"': 'keyword.operator'
'"."': 'keyword.operator'
'"?"': 'keyword.operator'
'":"': 'keyword.operator'
'"??"': 'keyword.operator'
'"as"': 'keyword.operator.logical'
'"new"': 'keyword.other.new'
'"clone"': 'keyword.other.clone'
'"insteadof"': 'keyword.other.insteadof'
'"instanceof"': 'keyword.operator.type'

'"."': 'meta.delimiter.property.period'
'","': 'meta.delimiter.object.comma'
Expand Down Expand Up @@ -100,3 +159,7 @@ scopes:
'"endswitch"': 'keyword.control'
'"case"': 'keyword.control'
'"default"': 'keyword.control'
'"yield"': 'keyword.control.yield'
'"goto"': 'keyword.control.goto'
'"exit"': 'keyword.control.exit'
'"die"': 'keyword.control.die'

0 comments on commit f792eb9

Please sign in to comment.