-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for Solution (.sln) files (#2213)
This adds support for VS Solution files. https://docs.microsoft.com/en-us/visualstudio/extensibility/internals/solution-dot-sln-file?view=vs-2019
- Loading branch information
1 parent
5362ba1
commit 15983d5
Showing
15 changed files
with
328 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
(function (Prism){ | ||
|
||
var guid = { | ||
// https://en.wikipedia.org/wiki/Universally_unique_identifier#Format | ||
pattern: /\{[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}\}/i, | ||
alias: 'constant', | ||
inside: { | ||
'punctuation': /[{}]/ | ||
} | ||
}; | ||
|
||
Prism.languages['solution-file'] = { | ||
'comment': { | ||
pattern: /#.*/, | ||
greedy: true | ||
}, | ||
'string': { | ||
pattern: /"[^"\r\n]*"|'[^'\r\n]*'/, | ||
greedy: true, | ||
inside: { | ||
'guid': guid | ||
} | ||
}, | ||
'object': { | ||
// Foo | ||
// Bar("abs") = 9 | ||
// EndBar | ||
// Prop = TRUE | ||
// EndFoo | ||
pattern: /^([ \t]*)(?:([A-Z]\w*)\b(?=.*(?:\r\n?|\n)(?:\1[ \t].*(?:\r\n?|\n))*\1End\2(?=[ \t]*$))|End[A-Z]\w*(?=[ \t]*$))/m, | ||
lookbehind: true, | ||
greedy: true, | ||
alias: 'keyword' | ||
}, | ||
'property': { | ||
pattern: /^([ \t]*)[^\r\n"#=()]*[^\s"#=()](?=\s*=)/m, | ||
lookbehind: true, | ||
inside: { | ||
'guid': guid | ||
} | ||
}, | ||
'guid': guid, | ||
'number': /\b\d+(?:\.\d+)*\b/, | ||
'boolean': /\b(?:FALSE|TRUE)\b/, | ||
'operator': /=/, | ||
'punctuation': /[(),]/ | ||
}; | ||
|
||
Prism.languages['sln'] = Prism.languages['solution-file']; | ||
|
||
}(Prism)); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<h2>Full example</h2> | ||
<pre><code># https://docs.microsoft.com/en-us/visualstudio/extensibility/internals/solution-dot-sln-file?view=vs-2015&redirectedfrom=MSDN | ||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.29709.97 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Project1", "Project1.vbproj", "{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionNotes) = postSolution | ||
EndGlobalSection | ||
GlobalSection(SolutionConfiguration) = preSolution | ||
ConfigName.0 = Debug | ||
ConfigName.1 = Release | ||
EndGlobalSection | ||
GlobalSection(ProjectDependencies) = postSolution | ||
EndGlobalSection | ||
GlobalSection(ProjectConfiguration) = postSolution | ||
{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}.Debug.ActiveCfg = Debug|x86 | ||
{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}.Debug.Build.0 = Debug|x86 | ||
{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}.Release.ActiveCfg = Release|x86 | ||
{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}.Release.Build.0 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityAddIns) = postSolution | ||
EndGlobalSection | ||
EndGlobal</code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
TRUE | ||
FALSE | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["boolean", "TRUE"], | ||
["boolean", "FALSE"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for booleans. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# comment | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["comment", "# comment"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for comments. |
Oops, something went wrong.