Skip to content

Commit 275cefd

Browse files
committed
Merge #316: vscode: add new keywords, change simfony to simplicityhl
399283e vscode: remove simfony name from repository link (Volodymyr Herashchenko) cbf8052 vscode: add new keywords (Volodymyr Herashchenko) 4b240c8 vscode: simfony -> simplicityhl (Volodymyr Herashchenko) Pull request description: Closes #305. Also change references from `simfony` to `simplicityhl` in some places ACKs for top commit: KyrylR: ACK 399283e; ran tests locally, code review Tree-SHA512: d718dc30f75c4a22cf62c8520fc13e36d758a9a7fbbe0d82a0979fafe74385c553aa9c54d8708234e744f083d17dbcad0beff61171e4139fbec34eb38541bb14
2 parents 6059156 + 399283e commit 275cefd

3 files changed

Lines changed: 60 additions & 60 deletions

File tree

vscode/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
"grammars": [
5656
{
5757
"language": "simplicityhl",
58-
"scopeName": "source.simfony",
59-
"path": "./syntaxes/simfony.tmLanguage.json"
58+
"scopeName": "source.simplicityhl",
59+
"path": "./syntaxes/simplicityhl.tmLanguage.json"
6060
},
6161
{
6262
"language": "simplicityhl-witness",

vscode/src/compile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export function getSimcPath(): string {
161161
}
162162

163163
throw new Error(
164-
"simc compiler not found. See https://github.com/BlockstreamResearch/simfony#installation " +
164+
"simc compiler not found. See https://github.com/BlockstreamResearch/SimplicityHL#installation " +
165165
"or set simplicityhl.compiler.path in settings."
166166
);
167167
}
Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3-
"name": "Simfony",
3+
"name": "SimplicityHL",
44
"patterns": [
55
{
66
"include": "#preprocessor"
@@ -34,32 +34,32 @@
3434
"preprocessor": {
3535
"patterns": [
3636
{
37-
"name": "meta.preprocessor.simfony",
37+
"name": "meta.preprocessor.simplicityhl",
3838
"match": "^\\s*#\\s*(include|define|undef|if|ifdef|ifndef|else|elif|endif|line|error|pragma)\\b",
3939
"captures": {
4040
"1": {
41-
"name": "keyword.other.preprocessor.directive.simfony"
41+
"name": "keyword.other.preprocessor.directive.simplicityhl"
4242
}
4343
}
4444
},
4545
{
46-
"name": "meta.preprocessor.include.simfony",
46+
"name": "meta.preprocessor.include.simplicityhl",
4747
"match": "^\\s*#\\s*include\\s+([\"<].*[\">])",
4848
"captures": {
4949
"1": {
50-
"name": "string.quoted.other.lt-gt.include.simfony"
50+
"name": "string.quoted.other.lt-gt.include.simplicityhl"
5151
}
5252
}
5353
},
5454
{
55-
"name": "meta.preprocessor.define.simfony",
55+
"name": "meta.preprocessor.define.simplicityhl",
5656
"begin": "^\\s*#\\s*(define)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
5757
"beginCaptures": {
5858
"1": {
59-
"name": "keyword.other.preprocessor.directive.simfony"
59+
"name": "keyword.other.preprocessor.directive.simplicityhl"
6060
},
6161
"2": {
62-
"name": "entity.name.function.preprocessor.simfony"
62+
"name": "entity.name.function.preprocessor.simplicityhl"
6363
}
6464
},
6565
"end": "(?=(?://|/\\*))|$",
@@ -70,34 +70,34 @@
7070
]
7171
},
7272
{
73-
"name": "meta.preprocessor.macro.simfony",
73+
"name": "meta.preprocessor.macro.simplicityhl",
7474
"begin": "^\\s*#\\s*(define)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\(",
7575
"beginCaptures": {
7676
"1": {
77-
"name": "keyword.other.preprocessor.directive.simfony"
77+
"name": "keyword.other.preprocessor.directive.simplicityhl"
7878
},
7979
"2": {
80-
"name": "entity.name.function.preprocessor.simfony"
80+
"name": "entity.name.function.preprocessor.simplicityhl"
8181
}
8282
},
8383
"end": "\\)|(?=(?://|/\\*))|$",
8484
"patterns": [
8585
{
86-
"name": "variable.parameter.preprocessor.simfony",
86+
"name": "variable.parameter.preprocessor.simplicityhl",
8787
"match": "[a-zA-Z_][a-zA-Z0-9_]*"
8888
},
8989
{
90-
"name": "punctuation.separator.parameters.simfony",
90+
"name": "punctuation.separator.parameters.simplicityhl",
9191
"match": ","
9292
}
9393
]
9494
},
9595
{
96-
"name": "meta.preprocessor.conditional.simfony",
96+
"name": "meta.preprocessor.conditional.simplicityhl",
9797
"begin": "^\\s*#\\s*(if|ifdef|ifndef|elif)\\b",
9898
"beginCaptures": {
9999
"1": {
100-
"name": "keyword.other.preprocessor.directive.simfony"
100+
"name": "keyword.other.preprocessor.directive.simplicityhl"
101101
}
102102
},
103103
"end": "(?=(?://|/\\*))|$",
@@ -112,30 +112,30 @@
112112
"preprocessor-expression": {
113113
"patterns": [
114114
{
115-
"name": "constant.language.preprocessor.simfony",
115+
"name": "constant.language.preprocessor.simplicityhl",
116116
"match": "\\b(defined)\\b"
117117
},
118118
{
119-
"name": "entity.name.function.preprocessor.simfony",
119+
"name": "entity.name.function.preprocessor.simplicityhl",
120120
"match": "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"
121121
},
122122
{
123123
"include": "#literals"
124124
},
125125
{
126-
"name": "keyword.operator.preprocessor.simfony",
126+
"name": "keyword.operator.preprocessor.simplicityhl",
127127
"match": "&&|\\|\\||==|!=|<=|>=|<|>|!|&&|\\|\\||\\+|\\-|\\*|\\/|%|<<|>>|&|\\||\\^|~"
128128
}
129129
]
130130
},
131131
"comments": {
132132
"patterns": [
133133
{
134-
"name": "comment.line.double-slash.simfony",
134+
"name": "comment.line.double-slash.simplicityhl",
135135
"match": "//.*$"
136136
},
137137
{
138-
"name": "comment.block.simfony",
138+
"name": "comment.block.simplicityhl",
139139
"begin": "/\\*",
140140
"end": "\\*/"
141141
}
@@ -144,27 +144,27 @@
144144
"keywords": {
145145
"patterns": [
146146
{
147-
"name": "storage.type.function.simfony",
147+
"name": "storage.type.function.simplicityhl",
148148
"match": "\\bfn\\b"
149149
},
150150
{
151-
"name": "storage.type.simfony",
151+
"name": "storage.type.simplicityhl",
152152
"match": "\\btype\\b"
153153
},
154154
{
155-
"name": "keyword.other.simfony",
156-
"match": "\\b(mod|const)\\b"
155+
"name": "keyword.other.simplicityhl",
156+
"match": "\\b(mod|const|use|as|crate|pub)\\b"
157157
},
158158
{
159-
"name": "storage.type.simfony",
159+
"name": "storage.type.simplicityhl",
160160
"match": "\\blet\\b"
161161
},
162162
{
163-
"name": "keyword.control.simfony",
163+
"name": "keyword.control.simplicityhl",
164164
"match": "\\b(match|if|else|while|for|return)\\b"
165165
},
166166
{
167-
"name": "keyword.operator.simfony",
167+
"name": "keyword.operator.simplicityhl",
168168
"match": "(->|=>|=|:|,|;)"
169169
}
170170
]
@@ -175,21 +175,21 @@
175175
"match": "\\b(assert|panic)(!)(\\s*\\(|\\s|$)",
176176
"captures": {
177177
"1": {
178-
"name": "keyword.other.preprocessor.directive.simfony"
178+
"name": "keyword.other.preprocessor.directive.simplicityhl"
179179
},
180180
"2": {
181-
"name": "keyword.other.preprocessor.directive.simfony"
181+
"name": "keyword.other.preprocessor.directive.simplicityhl"
182182
}
183183
}
184184
},
185185
{
186186
"match": "\\b([a-z][a-zA-Z0-9_]*)(!)(\\s*\\(|\\s|$)",
187187
"captures": {
188188
"1": {
189-
"name": "keyword.other.preprocessor.directive.simfony"
189+
"name": "keyword.other.preprocessor.directive.simplicityhl"
190190
},
191191
"2": {
192-
"name": "keyword.other.preprocessor.directive.simfony"
192+
"name": "keyword.other.preprocessor.directive.simplicityhl"
193193
}
194194
}
195195
}
@@ -198,25 +198,25 @@
198198
"functions": {
199199
"patterns": [
200200
{
201-
"name": "entity.name.function.simfony",
201+
"name": "entity.name.function.simplicityhl",
202202
"match": "\\b(unwrap_left|unwrap_right|for_while|is_none|array_fold|unwrap|into|fold|dbg)\\b"
203203
},
204204
{
205205
"match": "\\b(fn)\\s+([a-zA-Z][a-zA-Z0-9_]*)\\s*\\(",
206206
"captures": {
207207
"1": {
208-
"name": "storage.type.function.simfony"
208+
"name": "storage.type.function.simplicityhl"
209209
},
210210
"2": {
211-
"name": "entity.name.function.simfony"
211+
"name": "entity.name.function.simplicityhl"
212212
}
213213
}
214214
},
215215
{
216216
"match": "\\b([a-zA-Z][a-zA-Z0-9_]*)(?!!\\s*)\\s*\\(",
217217
"captures": {
218218
"1": {
219-
"name": "entity.name.function.call.simfony"
219+
"name": "entity.name.function.call.simplicityhl"
220220
}
221221
}
222222
}
@@ -225,37 +225,37 @@
225225
"types": {
226226
"patterns": [
227227
{
228-
"name": "entity.name.type.simfony",
228+
"name": "entity.name.type.simplicityhl",
229229
"match": "\\b(Either|Option|bool|List|u128|u256|u16|u32|u64|u1|u2|u4|u8)\\b"
230230
},
231231
{
232-
"name": "entity.name.type.simfony",
232+
"name": "entity.name.type.simplicityhl",
233233
"match": "\\b(Ctx8|Pubkey|Message64|Message|Signature|Scalar|Fe|Gej|Ge|Point|Height|Time|Distance|Duration|Lock|Outpoint|Confidential1|ExplicitAsset|Asset1|ExplicitAmount|Amount1|ExplicitNonce|Nonce|TokenAmount1)\\b"
234234
},
235235
{
236236
"match": "\\b(type)\\s+([A-Z][a-zA-Z0-9_]*)\\s*=",
237237
"captures": {
238238
"1": {
239-
"name": "storage.type.simfony"
239+
"name": "storage.type.simplicityhl"
240240
},
241241
"2": {
242-
"name": "entity.name.type.alias.simfony"
242+
"name": "entity.name.type.alias.simplicityhl"
243243
}
244244
}
245245
},
246246
{
247247
"match": "\\b([A-Z][a-zA-Z0-9_]*)\\b",
248248
"captures": {
249249
"1": {
250-
"name": "entity.name.type.simfony"
250+
"name": "entity.name.type.simplicityhl"
251251
}
252252
}
253253
},
254254
{
255255
"match": ":\\s*([a-zA-Z][a-zA-Z0-9_]*|Either<.*>|Option<.*>|\\(.*\\)|\\[.*\\]|List<.*>)",
256256
"captures": {
257257
"1": {
258-
"name": "entity.name.type.simfony"
258+
"name": "entity.name.type.simplicityhl"
259259
}
260260
}
261261
}
@@ -264,32 +264,32 @@
264264
"literals": {
265265
"patterns": [
266266
{
267-
"name": "constant.numeric.decimal.simfony",
267+
"name": "constant.numeric.decimal.simplicityhl",
268268
"match": "\\b[0-9][0-9_]*\\b"
269269
},
270270
{
271-
"name": "constant.numeric.binary.simfony",
271+
"name": "constant.numeric.binary.simplicityhl",
272272
"match": "\\b0b[01_]+\\b"
273273
},
274274
{
275-
"name": "constant.numeric.hex.simfony",
275+
"name": "constant.numeric.hex.simplicityhl",
276276
"match": "\\b0x[0-9a-fA-F_]+\\b"
277277
},
278278
{
279-
"name": "constant.language.boolean.simfony",
279+
"name": "constant.language.boolean.simplicityhl",
280280
"match": "\\b(true|false)\\b"
281281
},
282282
{
283-
"name": "constant.language.simfony",
283+
"name": "constant.language.simplicityhl",
284284
"match": "\\b(None)\\b"
285285
},
286286
{
287-
"name": "string.quoted.double.simfony",
287+
"name": "string.quoted.double.simplicityhl",
288288
"begin": "\"",
289289
"end": "\"",
290290
"patterns": [
291291
{
292-
"name": "constant.character.escape.simfony",
292+
"name": "constant.character.escape.simplicityhl",
293293
"match": "\\\\."
294294
}
295295
]
@@ -302,22 +302,22 @@
302302
"match": "\\b(jet|witness|param)::(\\w+)",
303303
"captures": {
304304
"1": {
305-
"name": "entity.name.namespace.simfony"
305+
"name": "entity.name.namespace.simplicityhl"
306306
},
307307
"2": {
308-
"name": "entity.name.function.simfony"
308+
"name": "entity.name.function.simplicityhl"
309309
}
310310
}
311311
},
312312
{
313-
"name": "variable.other.simfony",
313+
"name": "variable.other.simplicityhl",
314314
"match": "\\b[a-z][a-zA-Z0-9_]*\\b"
315315
},
316316
{
317317
"match": "\\b(Left|Right|Some)\\s*\\(",
318318
"captures": {
319319
"1": {
320-
"name": "support.function.simfony"
320+
"name": "support.function.simplicityhl"
321321
}
322322
}
323323
}
@@ -329,19 +329,19 @@
329329
"match": "\\b(mod)\\s+(witness|param)\\b",
330330
"captures": {
331331
"1": {
332-
"name": "keyword.other.simfony"
332+
"name": "keyword.other.simplicityhl"
333333
},
334334
"2": {
335-
"name": "entity.name.namespace.simfony"
335+
"name": "entity.name.namespace.simplicityhl"
336336
}
337337
}
338338
},
339339
{
340340
"match": "\\b(jet)\\b",
341-
"name": "entity.name.namespace.simfony"
341+
"name": "entity.name.namespace.simplicityhl"
342342
}
343343
]
344344
}
345345
},
346-
"scopeName": "source.simfony"
347-
}
346+
"scopeName": "source.simplicityhl"
347+
}

0 commit comments

Comments
 (0)