main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | 'use strict'
|
---|
2 |
|
---|
3 | module.exports = solutionFile
|
---|
4 | solutionFile.displayName = 'solutionFile'
|
---|
5 | solutionFile.aliases = []
|
---|
6 | function solutionFile(Prism) {
|
---|
7 | ;(function (Prism) {
|
---|
8 | var guid = {
|
---|
9 | // https://en.wikipedia.org/wiki/Universally_unique_identifier#Format
|
---|
10 | pattern: /\{[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}\}/i,
|
---|
11 | alias: 'constant',
|
---|
12 | inside: {
|
---|
13 | punctuation: /[{}]/
|
---|
14 | }
|
---|
15 | }
|
---|
16 | Prism.languages['solution-file'] = {
|
---|
17 | comment: {
|
---|
18 | pattern: /#.*/,
|
---|
19 | greedy: true
|
---|
20 | },
|
---|
21 | string: {
|
---|
22 | pattern: /"[^"\r\n]*"|'[^'\r\n]*'/,
|
---|
23 | greedy: true,
|
---|
24 | inside: {
|
---|
25 | guid: guid
|
---|
26 | }
|
---|
27 | },
|
---|
28 | object: {
|
---|
29 | // Foo
|
---|
30 | // Bar("abs") = 9
|
---|
31 | // EndBar
|
---|
32 | // Prop = TRUE
|
---|
33 | // EndFoo
|
---|
34 | pattern:
|
---|
35 | /^([ \t]*)(?:([A-Z]\w*)\b(?=.*(?:\r\n?|\n)(?:\1[ \t].*(?:\r\n?|\n))*\1End\2(?=[ \t]*$))|End[A-Z]\w*(?=[ \t]*$))/m,
|
---|
36 | lookbehind: true,
|
---|
37 | greedy: true,
|
---|
38 | alias: 'keyword'
|
---|
39 | },
|
---|
40 | property: {
|
---|
41 | pattern: /^([ \t]*)(?!\s)[^\r\n"#=()]*[^\s"#=()](?=\s*=)/m,
|
---|
42 | lookbehind: true,
|
---|
43 | inside: {
|
---|
44 | guid: guid
|
---|
45 | }
|
---|
46 | },
|
---|
47 | guid: guid,
|
---|
48 | number: /\b\d+(?:\.\d+)*\b/,
|
---|
49 | boolean: /\b(?:FALSE|TRUE)\b/,
|
---|
50 | operator: /=/,
|
---|
51 | punctuation: /[(),]/
|
---|
52 | }
|
---|
53 | Prism.languages['sln'] = Prism.languages['solution-file']
|
---|
54 | })(Prism)
|
---|
55 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.