Skip to content

Commit

Permalink
Merge upstream changes to csharp.tmLanguage
Browse files Browse the repository at this point in the history
  • Loading branch information
bricelam committed Jul 16, 2023
1 parent 7544bcf commit 14c4c4d
Show file tree
Hide file tree
Showing 4 changed files with 987 additions and 3,295 deletions.
20 changes: 15 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore

# User-specific files
*.rsuser
Expand Down Expand Up @@ -206,9 +206,6 @@ PublishScripts/
*.nuget.props
*.nuget.targets

# Nuget personal access tokens and Credentials
nuget.config

# Microsoft Azure Build Output
csx/
*.build.csdef
Expand Down Expand Up @@ -297,6 +294,17 @@ node_modules/
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw

# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp

# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp

# Visual Studio 6 technical files
*.ncb
*.aps

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
Expand Down Expand Up @@ -353,6 +361,9 @@ ASALocalRun/
# Local History for Visual Studio
.localhistory/

# Visual Studio History (VSHistory) files
.vshistory/

# BeatPulse healthcheck temp database
healthchecksdb

Expand Down Expand Up @@ -384,5 +395,4 @@ FodyWeavers.xsd
*.msp

# JetBrains Rider
.idea/
*.sln.iml
107 changes: 78 additions & 29 deletions T4Language/Syntaxes/csharp.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@
<array>
<dict>
<key>include</key>
<string>#method-declaration</string>
<string>#statement</string>
</dict>
<dict>
<key>include</key>
<string>#statement</string>
<string>#method-declaration</string>
</dict>
<dict>
<key>include</key>
Expand Down Expand Up @@ -129,11 +129,11 @@
</dict>
<dict>
<key>include</key>
<string>#record-declaration</string>
<string>#struct-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#struct-declaration</string>
<string>#record-declaration</string>
</dict>
<dict>
<key>include</key>
Expand Down Expand Up @@ -553,19 +553,29 @@
<array>
<dict>
<key>begin</key>
<string>\b(using)\b\s+(static)\s+</string>
<string>(\b(global)\b\s+)?\b(using)\b\s+(static)\b\s+(\b(unsafe)\b\s+)?</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.other.global.cs</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.other.using.cs</string>
</dict>
<key>2</key>
<key>4</key>
<dict>
<key>name</key>
<string>keyword.other.static.cs</string>
</dict>
<key>6</key>
<dict>
<key>name</key>
<string>storage.modifier.cs</string>
</dict>
</dict>
<key>end</key>
<string>(?=;)</string>
Expand All @@ -579,15 +589,25 @@
</dict>
<dict>
<key>begin</key>
<string>\b(using)\s+(?=(@?[_[:alpha:]][_[:alnum:]]*)\s*=)</string>
<string>(\b(global)\b\s+)?\b(using)\b\s+(\b(unsafe)\b\s+)?(?=(@?[_[:alpha:]][_[:alnum:]]*)\s*=)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.other.global.cs</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.other.using.cs</string>
</dict>
<key>2</key>
<key>5</key>
<dict>
<key>name</key>
<string>storage.modifier.cs</string>
</dict>
<key>6</key>
<dict>
<key>name</key>
<string>entity.name.type.alias.cs</string>
Expand All @@ -613,10 +633,15 @@
</dict>
<dict>
<key>begin</key>
<string>\b(using)\s*</string>
<string>(\b(global)\b\s+)?\b(using)\s*(?!\(|\s|var)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.other.global.cs</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.other.using.cs</string>
Expand Down Expand Up @@ -844,36 +869,42 @@
<key>name</key>
<string>storage.modifier.cs</string>
<key>match</key>
<string>(?&lt;!\.)\b(new|public|protected|internal|private|abstract|virtual|override|sealed|static|partial|readonly|volatile|const|extern|async|unsafe|ref|required)\b</string>
<string>(?&lt;!\.)\b(new|public|protected|internal|private|abstract|virtual|override|sealed|static|partial|readonly|volatile|const|extern|async|unsafe|ref|required|file)\b</string>
</dict>
<key>class-declaration</key>
<dict>
<key>begin</key>
<string>(?=\bclass\b)</string>
<string>(?=(\brecord\b\s+)?\bclass\b)</string>
<key>end</key>
<string>(?&lt;=\})</string>
<string>(?&lt;=\})|(?=;)</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?x)
(\b(record)\b\s+)?
\b(class)\b\s+
(@?[_[:alpha:]][_[:alnum:]]*)\s*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.other.record.cs</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.other.class.cs</string>
</dict>
<key>2</key>
<key>4</key>
<dict>
<key>name</key>
<string>entity.name.type.class.cs</string>
</dict>
</dict>
<key>end</key>
<string>(?=\{)</string>
<string>(?=\{)|(?=;)</string>
<key>patterns</key>
<array>
<dict>
Expand All @@ -884,6 +915,10 @@
<key>include</key>
<string>#type-parameter-list</string>
</dict>
<dict>
<key>include</key>
<string>#parenthesized-parameter-list</string>
</dict>
<dict>
<key>include</key>
<string>#base-types</string>
Expand Down Expand Up @@ -1242,7 +1277,7 @@
<key>begin</key>
<string>(?=\brecord\b)</string>
<key>end</key>
<string>(?&lt;=\})</string>
<string>(?&lt;=\})|(?=;)</string>
<key>patterns</key>
<array>
<dict>
Expand All @@ -1260,11 +1295,11 @@
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.type.record.cs</string>
<string>entity.name.type.class.cs</string>
</dict>
</dict>
<key>end</key>
<string>(?=\{)</string>
<string>(?=\{)|(?=;)</string>
<key>patterns</key>
<array>
<dict>
Expand All @@ -1275,6 +1310,10 @@
<key>include</key>
<string>#type-parameter-list</string>
</dict>
<dict>
<key>include</key>
<string>#parenthesized-parameter-list</string>
</dict>
<dict>
<key>include</key>
<string>#base-types</string>
Expand Down Expand Up @@ -1327,31 +1366,37 @@
<key>struct-declaration</key>
<dict>
<key>begin</key>
<string>(?=\bstruct\b)</string>
<string>(?=(\brecord\b\s+)?\bstruct\b)</string>
<key>end</key>
<string>(?&lt;=\})</string>
<string>(?&lt;=\})|(?=;)</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?x)
(\b(record)\b\s+)?
(struct)\b\s+
(@?[_[:alpha:]][_[:alnum:]]*)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.other.record.cs</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.other.struct.cs</string>
</dict>
<key>2</key>
<key>4</key>
<dict>
<key>name</key>
<string>entity.name.type.struct.cs</string>
</dict>
</dict>
<key>end</key>
<string>(?=\{)</string>
<string>(?=\{)|(?=;)</string>
<key>patterns</key>
<array>
<dict>
Expand All @@ -1362,6 +1407,10 @@
<key>include</key>
<string>#type-parameter-list</string>
</dict>
<dict>
<key>include</key>
<string>#parenthesized-parameter-list</string>
</dict>
<dict>
<key>include</key>
<string>#base-types</string>
Expand Down Expand Up @@ -1486,7 +1535,7 @@
</dict>
</dict>
<key>end</key>
<string>(?=\{|where)</string>
<string>(?=\{|where|;)</string>
<key>patterns</key>
<array>
<dict>
Expand Down Expand Up @@ -4979,7 +5028,7 @@
<key>numeric-literal</key>
<dict>
<key>match</key>
<string>(?&lt;!\w)\.?\d(?:(?:[0-9a-zA-Z_\.]|_)|(?&lt;=[eE])[+-])*</string>
<string>(?&lt;!\w)\.?\d(?:(?:[0-9a-zA-Z_]|_)|(?&lt;=[eE])[+-]|\.\d)*</string>
<key>captures</key>
<dict>
<key>0</key>
Expand Down Expand Up @@ -5211,7 +5260,7 @@
</dict>
<dict>
<key>match</key>
<string>(?:(?:[0-9a-zA-Z_\.]|_)|(?&lt;=[eE])[+-])+</string>
<string>(?:(?:[0-9a-zA-Z_]|_)|(?&lt;=[eE])[+-]|\.\d)+</string>
<key>name</key>
<string>invalid.illegal.constant.numeric.cs</string>
</dict>
Expand Down
Loading

0 comments on commit 14c4c4d

Please sign in to comment.