Skip to content

Commit

Permalink
Support variable variables in strings
Browse files Browse the repository at this point in the history
Allow `${$var}` and `{$$var}` syntax to be highlighted inside double
quoted strings.
  • Loading branch information
biinari committed Jul 1, 2024
1 parent 4bae3c2 commit 9d45c2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syntax/php.vim
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,8 @@ syn match phpMethod /\h\w*/ contained
syn match phpSplatOperator "\.\.\." contained display

" Identifier
syn match phpIdentifier "$\h\w*" contained contains=phpSuperglobals,phpVarSelector display
syn match phpIdentifierSimply "${\h\w*}" contains=phpOperator,phpParent contained display
syn match phpIdentifier "$$\?\h\w*" contained contains=phpSuperglobals,phpVarSelector display
syn match phpIdentifierSimply "${$\?\h\w*}" contains=phpOperator,phpParent contained display
syn region phpIdentifierComplex matchgroup=phpParent start="{\$"rs=e-1 end="}" contains=phpIdentifier,phpIdentifierSimply,phpSpecialChar,phpMethodsVar,phpStringSingle,phpStringDouble,phpBacktick,phpStrEsc contained extend

" Boolean
Expand Down

0 comments on commit 9d45c2b

Please sign in to comment.