demotape 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby-tests.yml +1 -1
  3. data/.gitignore +8 -0
  4. data/CHANGELOG.md +6 -0
  5. data/CONTRIBUTING.md +2 -2
  6. data/README.md +19 -10
  7. data/editors/sublime-text/DemoTape.sublime-syntax +1 -1
  8. data/editors/vim/ftdetect/demotape.vim +1 -1
  9. data/editors/vim/syntax/demotape.vim +1 -1
  10. data/editors/vscode/LICENSE.md +20 -0
  11. data/editors/vscode/README.md +12 -2
  12. data/editors/vscode/RELEASE_PROCESS.md +10 -0
  13. data/editors/vscode/demotape.tmLanguage.json +7 -6
  14. data/editors/vscode/icon.png +0 -0
  15. data/editors/vscode/package.json +20 -4
  16. data/editors/zed/extension.toml +12 -0
  17. data/editors/zed/grammars/demotape.wasm +0 -0
  18. data/editors/zed/languages/demotape/config.toml +11 -0
  19. data/editors/zed/languages/demotape/highlights.scm +70 -0
  20. data/editors/zed/package-lock.json +6 -0
  21. data/editors/zed/tree-sitter/Cargo.toml +26 -0
  22. data/editors/zed/tree-sitter/binding.gyp +19 -0
  23. data/editors/zed/tree-sitter/bindings/node/binding.cc +28 -0
  24. data/editors/zed/tree-sitter/bindings/node/index.js +19 -0
  25. data/editors/zed/tree-sitter/bindings/rust/build.rs +40 -0
  26. data/editors/zed/tree-sitter/bindings/rust/lib.rs +52 -0
  27. data/editors/zed/tree-sitter/grammar.js +227 -0
  28. data/editors/zed/tree-sitter/package-lock.json +36 -0
  29. data/editors/zed/tree-sitter/package.json +27 -0
  30. data/editors/zed/tree-sitter/queries/highlights.scm +70 -0
  31. data/editors/zed/tree-sitter/src/grammar.json +1123 -0
  32. data/editors/zed/tree-sitter/src/node-types.json +862 -0
  33. data/editors/zed/tree-sitter/src/parser.c +9337 -0
  34. data/editors/zed/tree-sitter/src/tree_sitter/parser.h +224 -0
  35. data/exe/demotape +1 -0
  36. data/lib/demo_tape/cli.rb +10 -2
  37. data/lib/demo_tape/command.rb +1 -1
  38. data/lib/demo_tape/ext/thor.rb +17 -0
  39. data/lib/demo_tape/version.rb +1 -1
  40. metadata +28 -7
  41. data/demotape_new.y.backup +0 -160
  42. data/demotape_simple_test.y +0 -32
@@ -0,0 +1,1123 @@
1
+ {
2
+ "name": "demotape",
3
+ "rules": {
4
+ "source_file": {
5
+ "type": "REPEAT",
6
+ "content": {
7
+ "type": "CHOICE",
8
+ "members": [
9
+ {
10
+ "type": "SYMBOL",
11
+ "name": "comment"
12
+ },
13
+ {
14
+ "type": "SYMBOL",
15
+ "name": "group_block"
16
+ },
17
+ {
18
+ "type": "SYMBOL",
19
+ "name": "command"
20
+ },
21
+ {
22
+ "type": "SYMBOL",
23
+ "name": "newline"
24
+ }
25
+ ]
26
+ }
27
+ },
28
+ "newline": {
29
+ "type": "PATTERN",
30
+ "value": "\\r?\\n"
31
+ },
32
+ "comment": {
33
+ "type": "PATTERN",
34
+ "value": "#.*"
35
+ },
36
+ "group_block": {
37
+ "type": "SEQ",
38
+ "members": [
39
+ {
40
+ "type": "STRING",
41
+ "value": "Group"
42
+ },
43
+ {
44
+ "type": "FIELD",
45
+ "name": "name",
46
+ "content": {
47
+ "type": "SYMBOL",
48
+ "name": "identifier"
49
+ }
50
+ },
51
+ {
52
+ "type": "STRING",
53
+ "value": "do"
54
+ },
55
+ {
56
+ "type": "REPEAT",
57
+ "content": {
58
+ "type": "CHOICE",
59
+ "members": [
60
+ {
61
+ "type": "SYMBOL",
62
+ "name": "comment"
63
+ },
64
+ {
65
+ "type": "SYMBOL",
66
+ "name": "command"
67
+ },
68
+ {
69
+ "type": "SYMBOL",
70
+ "name": "newline"
71
+ }
72
+ ]
73
+ }
74
+ },
75
+ {
76
+ "type": "STRING",
77
+ "value": "end"
78
+ }
79
+ ]
80
+ },
81
+ "identifier": {
82
+ "type": "PATTERN",
83
+ "value": "[a-z_][a-z0-9_]*"
84
+ },
85
+ "command": {
86
+ "type": "CHOICE",
87
+ "members": [
88
+ {
89
+ "type": "SYMBOL",
90
+ "name": "type_command"
91
+ },
92
+ {
93
+ "type": "SYMBOL",
94
+ "name": "run_command"
95
+ },
96
+ {
97
+ "type": "SYMBOL",
98
+ "name": "wait_until_command"
99
+ },
100
+ {
101
+ "type": "SYMBOL",
102
+ "name": "type_file_command"
103
+ },
104
+ {
105
+ "type": "SYMBOL",
106
+ "name": "set_command"
107
+ },
108
+ {
109
+ "type": "SYMBOL",
110
+ "name": "output_command"
111
+ },
112
+ {
113
+ "type": "SYMBOL",
114
+ "name": "copy_command"
115
+ },
116
+ {
117
+ "type": "SYMBOL",
118
+ "name": "paste_command"
119
+ },
120
+ {
121
+ "type": "SYMBOL",
122
+ "name": "send_command"
123
+ },
124
+ {
125
+ "type": "SYMBOL",
126
+ "name": "include_command"
127
+ },
128
+ {
129
+ "type": "SYMBOL",
130
+ "name": "screenshot_command"
131
+ },
132
+ {
133
+ "type": "SYMBOL",
134
+ "name": "wait_command"
135
+ },
136
+ {
137
+ "type": "SYMBOL",
138
+ "name": "sleep_command"
139
+ },
140
+ {
141
+ "type": "SYMBOL",
142
+ "name": "require_command"
143
+ },
144
+ {
145
+ "type": "SYMBOL",
146
+ "name": "pause_command"
147
+ },
148
+ {
149
+ "type": "SYMBOL",
150
+ "name": "resume_command"
151
+ },
152
+ {
153
+ "type": "SYMBOL",
154
+ "name": "clear_command"
155
+ },
156
+ {
157
+ "type": "SYMBOL",
158
+ "name": "key_command"
159
+ },
160
+ {
161
+ "type": "SYMBOL",
162
+ "name": "group_invocation"
163
+ }
164
+ ]
165
+ },
166
+ "group_invocation": {
167
+ "type": "SEQ",
168
+ "members": [
169
+ {
170
+ "type": "FIELD",
171
+ "name": "group",
172
+ "content": {
173
+ "type": "SYMBOL",
174
+ "name": "identifier"
175
+ }
176
+ }
177
+ ]
178
+ },
179
+ "type_command": {
180
+ "type": "SEQ",
181
+ "members": [
182
+ {
183
+ "type": "STRING",
184
+ "value": "Type"
185
+ },
186
+ {
187
+ "type": "CHOICE",
188
+ "members": [
189
+ {
190
+ "type": "SYMBOL",
191
+ "name": "duration_modifier"
192
+ },
193
+ {
194
+ "type": "BLANK"
195
+ }
196
+ ]
197
+ },
198
+ {
199
+ "type": "FIELD",
200
+ "name": "text",
201
+ "content": {
202
+ "type": "SYMBOL",
203
+ "name": "string"
204
+ }
205
+ }
206
+ ]
207
+ },
208
+ "type_file_command": {
209
+ "type": "SEQ",
210
+ "members": [
211
+ {
212
+ "type": "STRING",
213
+ "value": "TypeFile"
214
+ },
215
+ {
216
+ "type": "CHOICE",
217
+ "members": [
218
+ {
219
+ "type": "SYMBOL",
220
+ "name": "duration_modifier"
221
+ },
222
+ {
223
+ "type": "BLANK"
224
+ }
225
+ ]
226
+ },
227
+ {
228
+ "type": "FIELD",
229
+ "name": "path",
230
+ "content": {
231
+ "type": "SYMBOL",
232
+ "name": "string"
233
+ }
234
+ }
235
+ ]
236
+ },
237
+ "run_command": {
238
+ "type": "SEQ",
239
+ "members": [
240
+ {
241
+ "type": "STRING",
242
+ "value": "Run"
243
+ },
244
+ {
245
+ "type": "CHOICE",
246
+ "members": [
247
+ {
248
+ "type": "SYMBOL",
249
+ "name": "duration_modifier"
250
+ },
251
+ {
252
+ "type": "BLANK"
253
+ }
254
+ ]
255
+ },
256
+ {
257
+ "type": "FIELD",
258
+ "name": "command",
259
+ "content": {
260
+ "type": "SYMBOL",
261
+ "name": "string"
262
+ }
263
+ }
264
+ ]
265
+ },
266
+ "wait_until_command": {
267
+ "type": "SEQ",
268
+ "members": [
269
+ {
270
+ "type": "STRING",
271
+ "value": "WaitUntil"
272
+ },
273
+ {
274
+ "type": "CHOICE",
275
+ "members": [
276
+ {
277
+ "type": "SYMBOL",
278
+ "name": "duration_modifier"
279
+ },
280
+ {
281
+ "type": "BLANK"
282
+ }
283
+ ]
284
+ },
285
+ {
286
+ "type": "FIELD",
287
+ "name": "pattern",
288
+ "content": {
289
+ "type": "SYMBOL",
290
+ "name": "regex"
291
+ }
292
+ }
293
+ ]
294
+ },
295
+ "set_command": {
296
+ "type": "SEQ",
297
+ "members": [
298
+ {
299
+ "type": "STRING",
300
+ "value": "Set"
301
+ },
302
+ {
303
+ "type": "FIELD",
304
+ "name": "option",
305
+ "content": {
306
+ "type": "SYMBOL",
307
+ "name": "set_option"
308
+ }
309
+ },
310
+ {
311
+ "type": "FIELD",
312
+ "name": "value",
313
+ "content": {
314
+ "type": "CHOICE",
315
+ "members": [
316
+ {
317
+ "type": "SYMBOL",
318
+ "name": "string"
319
+ },
320
+ {
321
+ "type": "SYMBOL",
322
+ "name": "number"
323
+ },
324
+ {
325
+ "type": "SYMBOL",
326
+ "name": "duration"
327
+ },
328
+ {
329
+ "type": "SYMBOL",
330
+ "name": "boolean"
331
+ },
332
+ {
333
+ "type": "SYMBOL",
334
+ "name": "unquoted_string"
335
+ }
336
+ ]
337
+ }
338
+ },
339
+ {
340
+ "type": "CHOICE",
341
+ "members": [
342
+ {
343
+ "type": "SEQ",
344
+ "members": [
345
+ {
346
+ "type": "STRING",
347
+ "value": ","
348
+ },
349
+ {
350
+ "type": "FIELD",
351
+ "name": "value",
352
+ "content": {
353
+ "type": "CHOICE",
354
+ "members": [
355
+ {
356
+ "type": "SYMBOL",
357
+ "name": "number"
358
+ },
359
+ {
360
+ "type": "SYMBOL",
361
+ "name": "duration"
362
+ }
363
+ ]
364
+ }
365
+ }
366
+ ]
367
+ },
368
+ {
369
+ "type": "BLANK"
370
+ }
371
+ ]
372
+ },
373
+ {
374
+ "type": "CHOICE",
375
+ "members": [
376
+ {
377
+ "type": "SEQ",
378
+ "members": [
379
+ {
380
+ "type": "STRING",
381
+ "value": ","
382
+ },
383
+ {
384
+ "type": "FIELD",
385
+ "name": "value",
386
+ "content": {
387
+ "type": "CHOICE",
388
+ "members": [
389
+ {
390
+ "type": "SYMBOL",
391
+ "name": "number"
392
+ },
393
+ {
394
+ "type": "SYMBOL",
395
+ "name": "duration"
396
+ }
397
+ ]
398
+ }
399
+ }
400
+ ]
401
+ },
402
+ {
403
+ "type": "BLANK"
404
+ }
405
+ ]
406
+ },
407
+ {
408
+ "type": "CHOICE",
409
+ "members": [
410
+ {
411
+ "type": "SEQ",
412
+ "members": [
413
+ {
414
+ "type": "STRING",
415
+ "value": ","
416
+ },
417
+ {
418
+ "type": "FIELD",
419
+ "name": "value",
420
+ "content": {
421
+ "type": "CHOICE",
422
+ "members": [
423
+ {
424
+ "type": "SYMBOL",
425
+ "name": "number"
426
+ },
427
+ {
428
+ "type": "SYMBOL",
429
+ "name": "duration"
430
+ }
431
+ ]
432
+ }
433
+ }
434
+ ]
435
+ },
436
+ {
437
+ "type": "BLANK"
438
+ }
439
+ ]
440
+ }
441
+ ]
442
+ },
443
+ "set_option": {
444
+ "type": "PATTERN",
445
+ "value": "[a-z_]+(\\.[a-z_]+)?"
446
+ },
447
+ "output_command": {
448
+ "type": "SEQ",
449
+ "members": [
450
+ {
451
+ "type": "STRING",
452
+ "value": "Output"
453
+ },
454
+ {
455
+ "type": "FIELD",
456
+ "name": "path",
457
+ "content": {
458
+ "type": "SYMBOL",
459
+ "name": "string"
460
+ }
461
+ }
462
+ ]
463
+ },
464
+ "copy_command": {
465
+ "type": "SEQ",
466
+ "members": [
467
+ {
468
+ "type": "STRING",
469
+ "value": "Copy"
470
+ },
471
+ {
472
+ "type": "FIELD",
473
+ "name": "text",
474
+ "content": {
475
+ "type": "SYMBOL",
476
+ "name": "string"
477
+ }
478
+ }
479
+ ]
480
+ },
481
+ "paste_command": {
482
+ "type": "STRING",
483
+ "value": "Paste"
484
+ },
485
+ "send_command": {
486
+ "type": "SEQ",
487
+ "members": [
488
+ {
489
+ "type": "STRING",
490
+ "value": "Send"
491
+ },
492
+ {
493
+ "type": "FIELD",
494
+ "name": "text",
495
+ "content": {
496
+ "type": "SYMBOL",
497
+ "name": "string"
498
+ }
499
+ }
500
+ ]
501
+ },
502
+ "include_command": {
503
+ "type": "SEQ",
504
+ "members": [
505
+ {
506
+ "type": "STRING",
507
+ "value": "Include"
508
+ },
509
+ {
510
+ "type": "FIELD",
511
+ "name": "path",
512
+ "content": {
513
+ "type": "SYMBOL",
514
+ "name": "string"
515
+ }
516
+ }
517
+ ]
518
+ },
519
+ "screenshot_command": {
520
+ "type": "SEQ",
521
+ "members": [
522
+ {
523
+ "type": "STRING",
524
+ "value": "Screenshot"
525
+ },
526
+ {
527
+ "type": "CHOICE",
528
+ "members": [
529
+ {
530
+ "type": "FIELD",
531
+ "name": "path",
532
+ "content": {
533
+ "type": "SYMBOL",
534
+ "name": "string"
535
+ }
536
+ },
537
+ {
538
+ "type": "BLANK"
539
+ }
540
+ ]
541
+ }
542
+ ]
543
+ },
544
+ "wait_command": {
545
+ "type": "SEQ",
546
+ "members": [
547
+ {
548
+ "type": "STRING",
549
+ "value": "Wait"
550
+ },
551
+ {
552
+ "type": "FIELD",
553
+ "name": "duration",
554
+ "content": {
555
+ "type": "CHOICE",
556
+ "members": [
557
+ {
558
+ "type": "SYMBOL",
559
+ "name": "number"
560
+ },
561
+ {
562
+ "type": "SYMBOL",
563
+ "name": "duration"
564
+ }
565
+ ]
566
+ }
567
+ }
568
+ ]
569
+ },
570
+ "sleep_command": {
571
+ "type": "SEQ",
572
+ "members": [
573
+ {
574
+ "type": "STRING",
575
+ "value": "Sleep"
576
+ },
577
+ {
578
+ "type": "FIELD",
579
+ "name": "duration",
580
+ "content": {
581
+ "type": "CHOICE",
582
+ "members": [
583
+ {
584
+ "type": "SYMBOL",
585
+ "name": "number"
586
+ },
587
+ {
588
+ "type": "SYMBOL",
589
+ "name": "duration"
590
+ }
591
+ ]
592
+ }
593
+ }
594
+ ]
595
+ },
596
+ "require_command": {
597
+ "type": "SEQ",
598
+ "members": [
599
+ {
600
+ "type": "STRING",
601
+ "value": "Require"
602
+ },
603
+ {
604
+ "type": "FIELD",
605
+ "name": "command",
606
+ "content": {
607
+ "type": "CHOICE",
608
+ "members": [
609
+ {
610
+ "type": "SYMBOL",
611
+ "name": "string"
612
+ },
613
+ {
614
+ "type": "SYMBOL",
615
+ "name": "identifier"
616
+ }
617
+ ]
618
+ }
619
+ }
620
+ ]
621
+ },
622
+ "pause_command": {
623
+ "type": "STRING",
624
+ "value": "Pause"
625
+ },
626
+ "resume_command": {
627
+ "type": "STRING",
628
+ "value": "Resume"
629
+ },
630
+ "clear_command": {
631
+ "type": "STRING",
632
+ "value": "Clear"
633
+ },
634
+ "key_command": {
635
+ "type": "SEQ",
636
+ "members": [
637
+ {
638
+ "type": "FIELD",
639
+ "name": "key",
640
+ "content": {
641
+ "type": "SYMBOL",
642
+ "name": "key_combination"
643
+ }
644
+ },
645
+ {
646
+ "type": "CHOICE",
647
+ "members": [
648
+ {
649
+ "type": "SYMBOL",
650
+ "name": "duration_modifier"
651
+ },
652
+ {
653
+ "type": "BLANK"
654
+ }
655
+ ]
656
+ },
657
+ {
658
+ "type": "CHOICE",
659
+ "members": [
660
+ {
661
+ "type": "FIELD",
662
+ "name": "count",
663
+ "content": {
664
+ "type": "SYMBOL",
665
+ "name": "number"
666
+ }
667
+ },
668
+ {
669
+ "type": "BLANK"
670
+ }
671
+ ]
672
+ }
673
+ ]
674
+ },
675
+ "key_combination": {
676
+ "type": "CHOICE",
677
+ "members": [
678
+ {
679
+ "type": "SYMBOL",
680
+ "name": "special_key"
681
+ },
682
+ {
683
+ "type": "SYMBOL",
684
+ "name": "modifier_key"
685
+ },
686
+ {
687
+ "type": "SEQ",
688
+ "members": [
689
+ {
690
+ "type": "CHOICE",
691
+ "members": [
692
+ {
693
+ "type": "SYMBOL",
694
+ "name": "modifier_key"
695
+ },
696
+ {
697
+ "type": "SYMBOL",
698
+ "name": "letter_key"
699
+ }
700
+ ]
701
+ },
702
+ {
703
+ "type": "REPEAT1",
704
+ "content": {
705
+ "type": "SEQ",
706
+ "members": [
707
+ {
708
+ "type": "STRING",
709
+ "value": "+"
710
+ },
711
+ {
712
+ "type": "CHOICE",
713
+ "members": [
714
+ {
715
+ "type": "SYMBOL",
716
+ "name": "modifier_key"
717
+ },
718
+ {
719
+ "type": "SYMBOL",
720
+ "name": "special_key"
721
+ },
722
+ {
723
+ "type": "SYMBOL",
724
+ "name": "letter_key"
725
+ }
726
+ ]
727
+ }
728
+ ]
729
+ }
730
+ }
731
+ ]
732
+ }
733
+ ]
734
+ },
735
+ "special_key": {
736
+ "type": "CHOICE",
737
+ "members": [
738
+ {
739
+ "type": "STRING",
740
+ "value": "Enter"
741
+ },
742
+ {
743
+ "type": "STRING",
744
+ "value": "Return"
745
+ },
746
+ {
747
+ "type": "STRING",
748
+ "value": "Tab"
749
+ },
750
+ {
751
+ "type": "STRING",
752
+ "value": "Backspace"
753
+ },
754
+ {
755
+ "type": "STRING",
756
+ "value": "Delete"
757
+ },
758
+ {
759
+ "type": "STRING",
760
+ "value": "Escape"
761
+ },
762
+ {
763
+ "type": "STRING",
764
+ "value": "Esc"
765
+ },
766
+ {
767
+ "type": "STRING",
768
+ "value": "Space"
769
+ },
770
+ {
771
+ "type": "STRING",
772
+ "value": "Up"
773
+ },
774
+ {
775
+ "type": "STRING",
776
+ "value": "Down"
777
+ },
778
+ {
779
+ "type": "STRING",
780
+ "value": "Left"
781
+ },
782
+ {
783
+ "type": "STRING",
784
+ "value": "Right"
785
+ },
786
+ {
787
+ "type": "STRING",
788
+ "value": "Home"
789
+ },
790
+ {
791
+ "type": "STRING",
792
+ "value": "End"
793
+ },
794
+ {
795
+ "type": "STRING",
796
+ "value": "PageUp"
797
+ },
798
+ {
799
+ "type": "STRING",
800
+ "value": "PageDown"
801
+ },
802
+ {
803
+ "type": "STRING",
804
+ "value": "Insert"
805
+ },
806
+ {
807
+ "type": "STRING",
808
+ "value": "Cancel"
809
+ },
810
+ {
811
+ "type": "STRING",
812
+ "value": "Help"
813
+ },
814
+ {
815
+ "type": "STRING",
816
+ "value": "Semicolon"
817
+ },
818
+ {
819
+ "type": "STRING",
820
+ "value": "Colon"
821
+ },
822
+ {
823
+ "type": "STRING",
824
+ "value": "Equals"
825
+ },
826
+ {
827
+ "type": "STRING",
828
+ "value": "Slash"
829
+ },
830
+ {
831
+ "type": "STRING",
832
+ "value": "BackSlash"
833
+ },
834
+ {
835
+ "type": "PATTERN",
836
+ "value": "Numpad[0-9]"
837
+ },
838
+ {
839
+ "type": "STRING",
840
+ "value": "Multiply"
841
+ },
842
+ {
843
+ "type": "STRING",
844
+ "value": "Add"
845
+ },
846
+ {
847
+ "type": "STRING",
848
+ "value": "Separator"
849
+ },
850
+ {
851
+ "type": "STRING",
852
+ "value": "Subtract"
853
+ },
854
+ {
855
+ "type": "STRING",
856
+ "value": "Decimal"
857
+ },
858
+ {
859
+ "type": "STRING",
860
+ "value": "Divide"
861
+ },
862
+ {
863
+ "type": "PATTERN",
864
+ "value": "F([1-9]|1[0-2])"
865
+ }
866
+ ]
867
+ },
868
+ "modifier_key": {
869
+ "type": "CHOICE",
870
+ "members": [
871
+ {
872
+ "type": "STRING",
873
+ "value": "Ctrl"
874
+ },
875
+ {
876
+ "type": "STRING",
877
+ "value": "Control"
878
+ },
879
+ {
880
+ "type": "STRING",
881
+ "value": "Alt"
882
+ },
883
+ {
884
+ "type": "STRING",
885
+ "value": "Option"
886
+ },
887
+ {
888
+ "type": "STRING",
889
+ "value": "Shift"
890
+ },
891
+ {
892
+ "type": "STRING",
893
+ "value": "Meta"
894
+ },
895
+ {
896
+ "type": "STRING",
897
+ "value": "Command"
898
+ }
899
+ ]
900
+ },
901
+ "letter_key": {
902
+ "type": "PATTERN",
903
+ "value": "[A-Za-z0-9]"
904
+ },
905
+ "duration_modifier": {
906
+ "type": "SEQ",
907
+ "members": [
908
+ {
909
+ "type": "STRING",
910
+ "value": "@"
911
+ },
912
+ {
913
+ "type": "FIELD",
914
+ "name": "duration",
915
+ "content": {
916
+ "type": "CHOICE",
917
+ "members": [
918
+ {
919
+ "type": "SYMBOL",
920
+ "name": "duration"
921
+ },
922
+ {
923
+ "type": "SYMBOL",
924
+ "name": "number"
925
+ }
926
+ ]
927
+ }
928
+ }
929
+ ]
930
+ },
931
+ "string": {
932
+ "type": "CHOICE",
933
+ "members": [
934
+ {
935
+ "type": "SEQ",
936
+ "members": [
937
+ {
938
+ "type": "STRING",
939
+ "value": "\"\"\""
940
+ },
941
+ {
942
+ "type": "FIELD",
943
+ "name": "content",
944
+ "content": {
945
+ "type": "PATTERN",
946
+ "value": "([^\"]|\"[^\"]|\"\"[^\"])*?"
947
+ }
948
+ },
949
+ {
950
+ "type": "STRING",
951
+ "value": "\"\"\""
952
+ }
953
+ ]
954
+ },
955
+ {
956
+ "type": "SEQ",
957
+ "members": [
958
+ {
959
+ "type": "STRING",
960
+ "value": "\""
961
+ },
962
+ {
963
+ "type": "FIELD",
964
+ "name": "content",
965
+ "content": {
966
+ "type": "REPEAT",
967
+ "content": {
968
+ "type": "CHOICE",
969
+ "members": [
970
+ {
971
+ "type": "PATTERN",
972
+ "value": "[^\"\\\\]+"
973
+ },
974
+ {
975
+ "type": "SYMBOL",
976
+ "name": "escape_sequence"
977
+ }
978
+ ]
979
+ }
980
+ }
981
+ },
982
+ {
983
+ "type": "STRING",
984
+ "value": "\""
985
+ }
986
+ ]
987
+ },
988
+ {
989
+ "type": "SEQ",
990
+ "members": [
991
+ {
992
+ "type": "STRING",
993
+ "value": "'"
994
+ },
995
+ {
996
+ "type": "FIELD",
997
+ "name": "content",
998
+ "content": {
999
+ "type": "REPEAT",
1000
+ "content": {
1001
+ "type": "CHOICE",
1002
+ "members": [
1003
+ {
1004
+ "type": "PATTERN",
1005
+ "value": "[^'\\\\]+"
1006
+ },
1007
+ {
1008
+ "type": "SYMBOL",
1009
+ "name": "escape_sequence"
1010
+ }
1011
+ ]
1012
+ }
1013
+ }
1014
+ },
1015
+ {
1016
+ "type": "STRING",
1017
+ "value": "'"
1018
+ }
1019
+ ]
1020
+ }
1021
+ ]
1022
+ },
1023
+ "escape_sequence": {
1024
+ "type": "TOKEN",
1025
+ "content": {
1026
+ "type": "SEQ",
1027
+ "members": [
1028
+ {
1029
+ "type": "STRING",
1030
+ "value": "\\"
1031
+ },
1032
+ {
1033
+ "type": "CHOICE",
1034
+ "members": [
1035
+ {
1036
+ "type": "PATTERN",
1037
+ "value": "[ntr\\\\\"']"
1038
+ },
1039
+ {
1040
+ "type": "PATTERN",
1041
+ "value": "u[0-9a-fA-F]{4}"
1042
+ },
1043
+ {
1044
+ "type": "PATTERN",
1045
+ "value": "U[0-9a-fA-F]{8}"
1046
+ }
1047
+ ]
1048
+ }
1049
+ ]
1050
+ }
1051
+ },
1052
+ "unquoted_string": {
1053
+ "type": "PATTERN",
1054
+ "value": "[a-zA-Z_]\\w*"
1055
+ },
1056
+ "regex": {
1057
+ "type": "PATTERN",
1058
+ "value": "\\/([^\\/\\\\]|\\\\.)*\\/"
1059
+ },
1060
+ "duration": {
1061
+ "type": "TOKEN",
1062
+ "content": {
1063
+ "type": "SEQ",
1064
+ "members": [
1065
+ {
1066
+ "type": "PATTERN",
1067
+ "value": "\\d+(\\.\\d+)?"
1068
+ },
1069
+ {
1070
+ "type": "CHOICE",
1071
+ "members": [
1072
+ {
1073
+ "type": "STRING",
1074
+ "value": "ms"
1075
+ },
1076
+ {
1077
+ "type": "STRING",
1078
+ "value": "s"
1079
+ },
1080
+ {
1081
+ "type": "STRING",
1082
+ "value": "m"
1083
+ },
1084
+ {
1085
+ "type": "STRING",
1086
+ "value": "h"
1087
+ }
1088
+ ]
1089
+ }
1090
+ ]
1091
+ }
1092
+ },
1093
+ "number": {
1094
+ "type": "PATTERN",
1095
+ "value": "\\d+(\\.\\d+)?"
1096
+ },
1097
+ "boolean": {
1098
+ "type": "CHOICE",
1099
+ "members": [
1100
+ {
1101
+ "type": "STRING",
1102
+ "value": "true"
1103
+ },
1104
+ {
1105
+ "type": "STRING",
1106
+ "value": "false"
1107
+ }
1108
+ ]
1109
+ }
1110
+ },
1111
+ "extras": [
1112
+ {
1113
+ "type": "PATTERN",
1114
+ "value": "\\s"
1115
+ }
1116
+ ],
1117
+ "conflicts": [],
1118
+ "precedences": [],
1119
+ "externals": [],
1120
+ "inline": [],
1121
+ "supertypes": []
1122
+ }
1123
+