File tree Expand file tree Collapse file tree 2 files changed +36
-27
lines changed Expand file tree Collapse file tree 2 files changed +36
-27
lines changed Original file line number Diff line number Diff line change 3
3
import grammarMap from "./grammars/index"
4
4
5
5
import * as apple from "./grammars/apple"
6
- import * as c from "./grammars/c"
6
+ import c from "./grammars/c"
7
7
import * as coffeescript from "./grammars/coffeescript"
8
8
import database from "./grammars/database"
9
9
import * as doc from "./grammars/doc"
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ function args({ filepath }) {
32
32
return [ "-c" , cmdArgs ]
33
33
}
34
34
35
- export const C = {
35
+ const C = {
36
36
"File Based" : {
37
37
command : "bash" ,
38
38
args ( { filepath } ) {
@@ -75,7 +75,7 @@ export const C = {
75
75
} ,
76
76
}
77
77
78
- exports [ "C#" ] = {
78
+ const Cs = {
79
79
"Selection Based" : {
80
80
command,
81
81
args ( context ) {
@@ -101,7 +101,7 @@ exports["C#"] = {
101
101
} ,
102
102
} ,
103
103
}
104
- exports [ "C# Script File" ] = {
104
+ const CSScriptFile = {
105
105
"Selection Based" : {
106
106
command : "scriptcs" ,
107
107
args ( context ) {
@@ -118,7 +118,7 @@ exports["C# Script File"] = {
118
118
} ,
119
119
}
120
120
121
- exports [ "C++" ] = {
121
+ const Cpp = {
122
122
"Selection Based" : {
123
123
command : "bash" ,
124
124
args ( context ) {
@@ -175,30 +175,39 @@ exports["C++"] = {
175
175
} ,
176
176
} ,
177
177
}
178
- exports [ "C++14" ] = exports [ "C++" ]
178
+ const Cpp14 = Cpp
179
179
180
- if ( os === "darwin" ) {
181
- exports [ "Objective-C" ] = {
182
- "File Based" : {
183
- command : "bash" ,
184
- args ( { filepath } ) {
185
- return [
186
- "-c" ,
187
- `xcrun clang ${ options } -fcolor-diagnostics -framework Cocoa '${ filepath } ' -o /tmp/objc-c.out && /tmp/objc-c.out` ,
188
- ]
189
- } ,
180
+ const ObjectiveC = {
181
+ "File Based" : {
182
+ command : "bash" ,
183
+ args ( { filepath } ) {
184
+ return [
185
+ "-c" ,
186
+ `xcrun clang ${ options } -fcolor-diagnostics -framework Cocoa '${ filepath } ' -o /tmp/objc-c.out && /tmp/objc-c.out` ,
187
+ ]
190
188
} ,
191
- }
189
+ } ,
190
+ }
192
191
193
- exports [ "Objective-C++" ] = {
194
- "File Based" : {
195
- command : "bash" ,
196
- args ( { filepath } ) {
197
- return [
198
- "-c" ,
199
- `xcrun clang++ -Wc++11-extensions ${ options } -fcolor-diagnostics -include iostream -framework Cocoa '${ filepath } ' -o /tmp/objc-cpp.out && /tmp/objc-cpp.out` ,
200
- ]
201
- } ,
192
+ const ObjectiveCpp = {
193
+ "File Based" : {
194
+ command : "bash" ,
195
+ args ( { filepath } ) {
196
+ return [
197
+ "-c" ,
198
+ `xcrun clang++ -Wc++11-extensions ${ options } -fcolor-diagnostics -include iostream -framework Cocoa '${ filepath } ' -o /tmp/objc-cpp.out && /tmp/objc-cpp.out` ,
199
+ ]
202
200
} ,
203
- }
201
+ } ,
202
+ }
203
+
204
+ const CGrammars = {
205
+ C,
206
+ "C++" : Cpp ,
207
+ "C++14" : Cpp14 ,
208
+ "C#" : Cs ,
209
+ "C# Script File" : CSScriptFile ,
210
+ "Objective-C" : ObjectiveC ,
211
+ "Objective-C++" : ObjectiveCpp ,
204
212
}
213
+ export default CGrammars
You can’t perform that action at this time.
0 commit comments