Skip to content

Commit a24c736

Browse files
committed
content_clause -> content_literal
1 parent a092386 commit a24c736

File tree

3 files changed

+38
-38
lines changed

3 files changed

+38
-38
lines changed

grammar.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module.exports = grammar({
5656
*/
5757
create_command: $ => seq(
5858
'CREATE', $.singlefile_clause,
59-
'WITH', $.content_clause
59+
'WITH', $.content_literal
6060
),
6161

6262
/**
@@ -106,7 +106,7 @@ module.exports = grammar({
106106
$.insert_clause,
107107
$.replace_region_clause
108108
),
109-
seq('WITH', choice($.content_clause, $.content_from_segment))
109+
seq('WITH', choice($.content_literal, $.content_from_segment))
110110
)
111111
)
112112
)
@@ -122,7 +122,7 @@ module.exports = grammar({
122122
$.insert_clause,
123123
$.replace_region_clause
124124
),
125-
seq('WITH', choice($.content_clause, $.content_from_segment))
125+
seq('WITH', choice($.content_literal, $.content_from_segment))
126126
)
127127
)
128128
)
@@ -393,7 +393,7 @@ of the code. The CEDARScript interpreter will handle the actual formatting and i
393393
in the target code file.
394394
</details>
395395
*/
396-
content_clause: $ => seq('CONTENT', field('content', $.string)),
396+
content_literal: $ => seq('CONTENT', field('content', $.string)),
397397

398398
escape_sequence: $ => token(seq(
399399
'\\',

test/corpus/create.txt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@ Log 'a' '' x
1515
(singlefile_clause
1616
(string
1717
(raw_string)))
18-
(content_clause
18+
(content_literal
1919
(string
2020
(single_quoted_string))))
2121
(create_command
2222
(singlefile_clause
2323
(string
2424
(single_quoted_string
2525
(escape_sequence))))
26-
(content_clause
26+
(content_literal
2727
(string
2828
(single_quoted_string))))
2929
(create_command
3030
(singlefile_clause
3131
(string
3232
(single_quoted_string)))
33-
(content_clause
33+
(content_literal
3434
(string
3535
(multi_line_string))))
3636
(command_separator))
@@ -63,23 +63,23 @@ Welcome!
6363
(singlefile_clause
6464
(string
6565
(single_quoted_string)))
66-
(content_clause
66+
(content_literal
6767
(string
6868
(multi_line_string))))
6969
(command_separator)
7070
(create_command
7171
(singlefile_clause
7272
(string
7373
(single_quoted_string)))
74-
(content_clause
74+
(content_literal
7575
(string
7676
(multi_line_string))))
7777
(command_separator)
7878
(create_command
7979
(singlefile_clause
8080
(string
8181
(single_quoted_string)))
82-
(content_clause
82+
(content_literal
8383
(string
8484
(multi_line_string))))
8585
(command_separator))
@@ -99,23 +99,23 @@ CREATE FILE "/root/quotes_file.json" WITH CONTENT "{\"key\": \"value with \\\"qu
9999
(singlefile_clause
100100
(string
101101
(single_quoted_string)))
102-
(content_clause
102+
(content_literal
103103
(string
104104
(single_quoted_string))))
105105
(command_separator)
106106
(create_command
107107
(singlefile_clause
108108
(string
109109
(raw_string)))
110-
(content_clause
110+
(content_literal
111111
(string
112112
(single_quoted_string))))
113113
(command_separator)
114114
(create_command
115115
(singlefile_clause
116116
(string
117117
(single_quoted_string)))
118-
(content_clause
118+
(content_literal
119119
(string
120120
(single_quoted_string
121121
(escape_sequence)
@@ -154,55 +154,55 @@ The purpose is to test the parser's ability to handle large multiline strings an
154154
(singlefile_clause
155155
(string
156156
(single_quoted_string)))
157-
(content_clause
157+
(content_literal
158158
(string
159159
(single_quoted_string))))
160160
(command_separator)
161161
(create_command
162162
(singlefile_clause
163163
(string
164164
(single_quoted_string)))
165-
(content_clause
165+
(content_literal
166166
(string
167167
(single_quoted_string))))
168168
(command_separator)
169169
(create_command
170170
(singlefile_clause
171171
(string
172172
(single_quoted_string)))
173-
(content_clause
173+
(content_literal
174174
(string
175175
(single_quoted_string))))
176176
(command_separator)
177177
(create_command
178178
(singlefile_clause
179179
(string
180180
(single_quoted_string)))
181-
(content_clause
181+
(content_literal
182182
(string
183183
(single_quoted_string))))
184184
(command_separator)
185185
(create_command
186186
(singlefile_clause
187187
(string
188188
(single_quoted_string)))
189-
(content_clause
189+
(content_literal
190190
(string
191191
(single_quoted_string))))
192192
(command_separator)
193193
(create_command
194194
(singlefile_clause
195195
(string
196196
(single_quoted_string)))
197-
(content_clause
197+
(content_literal
198198
(string
199199
(single_quoted_string))))
200200
(command_separator)
201201
(create_command
202202
(singlefile_clause
203203
(string
204204
(raw_string)))
205-
(content_clause
205+
(content_literal
206206
(string
207207
(multi_line_string
208208
(escape_sequence)))))

test/corpus/update.txt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ WITH CONTENT "...";
3232
(marker
3333
(lineMarker
3434
(number))))))
35-
(content_clause
35+
(content_literal
3636
(string
3737
(single_quoted_string))))
3838
(command_separator)
@@ -47,7 +47,7 @@ WITH CONTENT "...";
4747
(lineMarker
4848
(string
4949
(single_quoted_string)))))))
50-
(content_clause
50+
(content_literal
5151
(string
5252
(single_quoted_string))))
5353
(command_separator)
@@ -62,7 +62,7 @@ WITH CONTENT "...";
6262
(lineMarker
6363
(string
6464
(single_quoted_string)))))))
65-
(content_clause
65+
(content_literal
6666
(string
6767
(single_quoted_string))))
6868
(command_separator)
@@ -77,7 +77,7 @@ WITH CONTENT "...";
7777
(lineMarker
7878
(string
7979
(single_quoted_string)))))))
80-
(content_clause
80+
(content_literal
8181
(string
8282
(single_quoted_string))))
8383
(command_separator))
@@ -192,7 +192,7 @@ UPDATE FILE "file" DELETE BODY -- Synonym
192192
(lineMarker
193193
(string
194194
(single_quoted_string)))))))
195-
(content_clause
195+
(content_literal
196196
(string
197197
(single_quoted_string))))
198198
(command_separator)
@@ -209,7 +209,7 @@ UPDATE FILE "file" DELETE BODY -- Synonym
209209
(single_quoted_string))
210210
(offset_clause
211211
(number)))))))
212-
(content_clause
212+
(content_literal
213213
(string
214214
(single_quoted_string))))
215215
(update_command
@@ -224,7 +224,7 @@ UPDATE FILE "file" DELETE BODY -- Synonym
224224
(single_quoted_string))
225225
(offset_clause
226226
(number))))))
227-
(content_clause
227+
(content_literal
228228
(string
229229
(single_quoted_string))))
230230
(command_separator)
@@ -239,7 +239,7 @@ UPDATE FILE "file" DELETE BODY -- Synonym
239239
(identifierMarker
240240
(string
241241
(single_quoted_string)))))))
242-
(content_clause
242+
(content_literal
243243
(string
244244
(multi_line_string))))
245245
(update_command
@@ -248,7 +248,7 @@ UPDATE FILE "file" DELETE BODY -- Synonym
248248
(single_quoted_string)))
249249
(replace_region_clause
250250
(region_field))
251-
(content_clause
251+
(content_literal
252252
(string
253253
(single_quoted_string))))
254254
(comment)
@@ -258,7 +258,7 @@ UPDATE FILE "file" DELETE BODY -- Synonym
258258
(single_quoted_string)))
259259
(replace_region_clause
260260
(region_field))
261-
(content_clause
261+
(content_literal
262262
(string
263263
(single_quoted_string))))
264264
(comment)
@@ -286,7 +286,7 @@ UPDATE FILE "file" DELETE BODY -- Synonym
286286
(lineMarker
287287
(string
288288
(single_quoted_string))))))))))
289-
(content_clause
289+
(content_literal
290290
(string
291291
(multi_line_string))))
292292
(command_separator)
@@ -504,7 +504,7 @@ DELETE SEGMENT
504504
(single_quoted_string))))
505505
(replace_region_clause
506506
(region_field))
507-
(content_clause
507+
(content_literal
508508
(string
509509
(multi_line_string))))
510510
(command_separator)
@@ -518,7 +518,7 @@ DELETE SEGMENT
518518
(single_quoted_string))))
519519
(replace_region_clause
520520
(region_field))
521-
(content_clause
521+
(content_literal
522522
(string
523523
(multi_line_string))))
524524
(command_separator)
@@ -532,7 +532,7 @@ DELETE SEGMENT
532532
(single_quoted_string))))
533533
(replace_region_clause
534534
(region_field))
535-
(content_clause
535+
(content_literal
536536
(string
537537
(multi_line_string))))
538538
(command_separator)
@@ -546,7 +546,7 @@ DELETE SEGMENT
546546
(single_quoted_string))))
547547
(replace_region_clause
548548
(region_field))
549-
(content_clause
549+
(content_literal
550550
(string
551551
(single_quoted_string))))
552552
(command_separator)
@@ -560,7 +560,7 @@ DELETE SEGMENT
560560
(single_quoted_string))))
561561
(replace_region_clause
562562
(region_field))
563-
(content_clause
563+
(content_literal
564564
(string
565565
(single_quoted_string))))
566566
(command_separator)
@@ -583,7 +583,7 @@ DELETE SEGMENT
583583
(single_quoted_string))
584584
(offset_clause
585585
(number)))))))
586-
(content_clause
586+
(content_literal
587587
(string
588588
(single_quoted_string))))
589589
(update_command
@@ -997,7 +997,7 @@ SEGMENT
997997
(single_quoted_string))
998998
(offset_clause
999999
(number))))))))))
1000-
(content_clause
1000+
(content_literal
10011001
(string
10021002
(multi_line_string))))
10031003
(command_separator)

0 commit comments

Comments
 (0)