Skip to content

Commit

Permalink
Add Backslash Escape Syntax Highlighting
Browse files Browse the repository at this point in the history
Still working on keeping function parameters from turning red...
  • Loading branch information
BellCubeDev committed Feb 20, 2023
1 parent 49e8ad1 commit 06cfb6b
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions src/papyrus-lang-vscode/syntaxes/papyrus/papyrus.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
</dict>
<dict>
<key>match</key>
<string>(?i)(conditional|default|hidden|native|const)</string>
<string>(?i)(?:\s+|(?&lt;=/;))(conditional|default|hidden|native|const)(?=\s|;|$)</string>
<key>name</key>
<string>keyword.language.script-flag.papyrus</string>
</dict>
Expand Down Expand Up @@ -335,6 +335,10 @@
<key>include</key>
<string>#builtin-funcs</string>
</dict>
<dict>
<key>include</key>
<string>#newline-escape</string>
</dict>
</array>
<key>repository</key>
<dict>
Expand Down Expand Up @@ -371,12 +375,33 @@
</dict>
<key>quoted-string</key>
<dict>
<key>name</key>
<string>string.quoted.double.papyrus</string>
<key>begin</key>
<string>&quot;</string>
<key>end</key>
<string>&quot;</string>
<string>[&quot;\n]</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#string-character-escape</string>
</dict>
</array>
</dict>
<key>string-character-escape</key>
<dict>
<key>name</key>
<string>string.quoted.double.papyrus</string>
<string>constant.character.escape.papyrus</string>
<key>match</key>
<string>\\[nt\\&quot;]?</string>
</dict>
<key>newline-escape</key>
<dict>
<key>match</key>
<string>\\(?=\s*\n)</string>
<key>name</key>
<string>constant.character.escape.papyrus</string>
</dict>
<key>params</key>
<dict>
Expand Down Expand Up @@ -414,6 +439,10 @@
<key>name</key>
<string>meta.parameter.papyrus</string>
</dict>
<dict>
<key>include</key>
<string>#newline-escape</string>
</dict>
<dict>
<key>match</key>
<string>[^\s\)]+?</string>
Expand Down

0 comments on commit 06cfb6b

Please sign in to comment.