8000 Build temporary project so the package works · Benvie/JavaScriptNext.tmLanguage@2ec8250 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ec8250

Browse files
committed
Build temporary project so the package works
1 parent daee44c commit 2ec8250

22 files changed

+8722
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/*.cache

Comments.YAML-tmPreferences

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# [PackageDev] target_format: plist, ext: tmPreferences
2+
name: Comments
3+
uuid: A67A8BD9-A951-406F-9175-018DD4B52FD1
4+
scope: source.js, source.json
5+
settings:
6+
shellVariables:
7+
- name: TM_COMMENT_START
8+
value: '// '
9+
- name: TM_COMMENT_START_2
10+
value: /*
11+
- name: TM_COMMENT_END_2
12+
value: '*/'

Comments.tmPreferences

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>name</key>
6+
<string>Comments</string>
7+
<key>scope</key>
8+
<string>source.js, source.json</string>
9+
<key>settings</key>
10+
<dict>
11+
<key>shellVariables</key>
12+
<array>
13+
<dict>
14+
<key>name</key>
15+
<string>TM_COMMENT_START</string>
16+
<key>value</key>
17+
<string>// </string>
18+
</dict>
19+
<dict>
20+
<key>name</key>
21+
<string>TM_COMMENT_START_2</string>
22+
<key>value</key>
23+
<string>/*</string>
24+
</dict>
25+
<dict>
26+
<key>name</key>
27+
<string>TM_COMMENT_END_2</string>
28+
<key>value</key>
29+
<string>*/</string>
30+
</dict>
31+
</array>
32+
</dict>
33+
<key>uuid</key>
34+
<string>A67A8BD9-A951-406F-9175-018DD4B52FD1</string>
35+
</dict>
36+
</plist>

JSON (JavaScriptNext).YAML-tmLanguage

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# [PackageDev] target_format: plist, ext: tmLanguage
2+
name: JSON (Javascript Next)
3+
scopeName: source.json
4+
fileTypes: [json, sublime-settings, sublime-menu, sublime-keymap, sublime-mousemap,
5+
sublime-theme, sublime-build, sublime-project, sublime-completions]
6+
uuid: 8f97457b-516e-48ce-83c7-08ae12fb327a
7+
foldingStartMarker: >-
8+
(?x) # turn on extended mode
9+
^ # a line beginning with
10+
\s* # some optional space
11+
[{\[] # the start of an object or array
12+
(?! # but not followed by
13+
.* # whatever
14+
[}\]] # and the close of an object or array
15+
,? # an optional comma
16+
\s* # some optional space
17+
$ # at the end of the line
18+
)
19+
| # ...or...
20+
[{\[] # the start of an object or array
21+
\s* # some optional space
22+
$ # at the end of the line
23+
foldingStopMarker: >-
24+
(?x) # turn on extended mode
25+
^ # a line beginning with
26+
\s* # some optional space
27+
[}\]] # and the close of an object or array
28+
keyEquivalent: ^~J
29+
30+
patterns:
31+
- include: '#value'
32+
33+
repository:
34+
array:
35+
name: meta.structure.array.json
36+
begin: \[
37+
beginCaptures:
38+
'0': {name: punctuation.definition.array.begin.json}
39+
end: \]
40+
endCaptures:
41+
'0': {name: punctuation.definition.array.end.json}
42+
patterns:
43+
- include: '#value'
44+
- name: punctuation.separator.array.json
45+
match: ','
46+
- name: invalid.illegal.expected-array-separator.json
47+
match: '[^\s\]]'
48+
49+
comments:
50+
patterns:
51+
- name: comment.block.documentation.json
52+
begin: /\*\*
53+
end: \*/
54+
captures:
55+
'0': {name: punctuation.definition.comment.json}
56+
- name: comment.block.json
57+
begin: /\*
58+
end: \*/
59+
captures:
60+
'0': {name: punctuation.definition.comment.json}
61+
- name: comment.line.double-slash.js
62+
match: (//).*$\n?
63+
captures:
64+
'1': {name: punctuation.definition.comment.json}
65+
66+
constant:
67+
name: constant.language.json
68+
match: \b(?:true|false|null)\b
69+
70+
# handles integer and decimal numbers
71+
number:
72+
name: constant.numeric.json
73+
match: >-
74+
(?x) # turn on extended mode
75+
-? # an optional minus
76+
(?:
77+
0 # a zero
78+
| # ...or...
79+
[1-9] # a 1-9 character
80+
\d* # followed by zero or more digits
81+
)
82+
(?:
83+
(?:
84+
\. # a period
85+
\d+ # followed by one or more digits
86+
)?
87+
(?:
88+
[eE] # an e character
89+
[+-]? # followed by an option +/-
90+
\d+ # followed by one or more digits
91+
)? # make exponent optional
92+
)? # make decimal portion optional
93+
94+
# a JSON object
95+
object:
96+
name: meta.structure.dictionary.json
97+
begin: \{
98+
beginCaptures:
99+
'0': {name: punctuation.definition.dictionary.begin.json}
100+
end: \}
101+
endCaptures:
102+
'0': {name: punctuation.definition.dictionary.end.json}
103+
patterns:
104+
- comment: the JSON object key
105+
include: '#string'
106+
- include: '#comments'
107+
- name: meta.structure.dictionary.value.json
108+
begin: ':'
109+
beginCaptures:
110+
'0': {name: punctuation.separator.dictionary.key-value.json}
111+
end: (,)|(?=\})
112+
endCaptures:
113+
'1': {name: punctuation.separator.dictionary.pair.json}
114+
patterns:
115+
- comment: the JSON object value
116+
include: '#value'
117+
- name: invalid.illegal.expected-dictionary-separator.json
118+
match: '[^\s,]'
119+
- name: invalid.illegal.expected-dictionary-separator.json
120+
match: '[^\s\}]'
121+
122+
string:
123+
name: string.quoted.double.json
124+
begin: '"'
125+
beginCaptures:
126+
'0': {name: punctuation.definition.string.begin.json}
127+
end: '"'
128+
endCaptures:
129+
'0': {name: punctuation.definition.string.end.json}
130+
patterns:
131+
- name: constant.character.escape.json
132+
match: >-
133+
(?x) # turn on extended mode
134+
\\ # a literal backslash
135+
(?: # ...followed by...
136+
["\\/bfnrt] # one of these characters
137+
| # ...or...
138+
u # a u
139+
[0-9a-fA-F]{4}) # and four hex digits
140+
- name: invalid.illegal.unrecognized-string-escape.json
141+
match: \\.
142+
143+
# the 'value' diagram at http://json.org
144+
value:
145+
patterns:
146+
- include: '#constant'
147+
- include: '#number'
148+
- include: '#string'
149+
- include: '#array'
150+
- include: '#object'
151+
- include: '#comments'

0 commit comments

Comments
 (0)
0