demotape 0.0.7 → 0.0.8
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Makefile +7 -0
- data/README.md +8 -0
- data/editors/sublime-text/DemoTape.sublime-completions +2 -0
- data/editors/sublime-text/DemoTape.sublime-syntax +5 -5
- data/editors/vim/syntax/demotape.vim +1 -1
- data/editors/vscode/demotape.tmLanguage.json +4 -4
- data/editors/vscode/package.json +3 -3
- data/editors/zed/grammars/demotape.wasm +0 -0
- data/editors/zed/languages/demotape/highlights.scm +1 -0
- data/editors/zed/tree-sitter/grammar.js +7 -0
- data/editors/zed/tree-sitter/package-lock.json +2 -2
- data/editors/zed/tree-sitter/src/grammar.json +29 -0
- data/editors/zed/tree-sitter/src/node-types.json +27 -0
- data/editors/zed/tree-sitter/src/parser.c +6117 -5455
- data/lib/demo_tape/command.rb +1 -4
- data/lib/demo_tape/parser/rules.rb +5 -0
- data/lib/demo_tape/runner.rb +8 -0
- data/lib/demo_tape/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7d52409cc191aed4c00084f2de0fcccd3ddb80d121bdeffda786ac680d7c3632
|
|
4
|
+
data.tar.gz: 5a69e7d5bf40278b1466a00e18f9e3fdf7020aa1f769dc75229b16140193e866
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 11e842eedd0656db535abf4572408cb0c2ebfc576f5fa3fa809f3699efc272e540244fce66a8dd62098164c9daea0be3f6e958ff57e49a21a8a60e7a656765c3
|
|
7
|
+
data.tar.gz: 25a9b6cfb6daf5f84831980e1ede66ed5b5fabd617a71682c7790cc973a1a8adc884b60bdb5c65eef38c2c633cabc7179672b0e9c35fde2f7d4fbcaf3f873427
|
data/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,11 @@ Prefix your message with one of the following:
|
|
|
11
11
|
- [Security] in case of vulnerabilities.
|
|
12
12
|
-->
|
|
13
13
|
|
|
14
|
+
## v0.0.8
|
|
15
|
+
|
|
16
|
+
- [Added] Add `WaitUntilDone`, which is just a shortcut for
|
|
17
|
+
`WaitUntil /::done::/`.
|
|
18
|
+
|
|
14
19
|
## v0.0.7
|
|
15
20
|
|
|
16
21
|
- [Fixed] Fix key combos that had numbers in them not being recognized.
|
data/Makefile
CHANGED
|
@@ -29,3 +29,10 @@ theme-examples:
|
|
|
29
29
|
optipng -quiet -o2 examples/themes/$${name}.png; \
|
|
30
30
|
fi; \
|
|
31
31
|
done;
|
|
32
|
+
|
|
33
|
+
zed:
|
|
34
|
+
@cd editors/zed/tree-sitter && \
|
|
35
|
+
npm install && \
|
|
36
|
+
node_modules/.bin/tree-sitter generate && \
|
|
37
|
+
node_modules/.bin/tree-sitter build-wasm && \
|
|
38
|
+
mv tree-sitter-demotape.wasm ../grammars/demotape.wasm
|
data/README.md
CHANGED
|
@@ -282,6 +282,14 @@ WaitUntil@10s /complete/
|
|
|
282
282
|
The pattern is a regular expression. The command waits until the terminal output
|
|
283
283
|
matches the pattern or the timeout is reached.
|
|
284
284
|
|
|
285
|
+
**WaitUntilDone** - Wait for output matching `/::done::`. This is just a
|
|
286
|
+
shortcut for `WaitUntil /::done::/`.
|
|
287
|
+
|
|
288
|
+
```demotape
|
|
289
|
+
WaitUntilDone
|
|
290
|
+
WaitUntilDone@5s
|
|
291
|
+
```
|
|
292
|
+
|
|
285
293
|
#### Clipboard
|
|
286
294
|
|
|
287
295
|
**Copy** - Copy text to clipboard
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
{ "trigger": "Sleep", "contents": "Sleep ${1:1s}" },
|
|
24
24
|
{ "trigger": "WaitUntil", "contents": "WaitUntil /${1:pattern}/" },
|
|
25
25
|
{ "trigger": "WaitUntil@", "contents": "WaitUntil@${1:5s} /${2:pattern}/" },
|
|
26
|
+
{ "trigger": "WaitUntilDone", "contents": "WaitUntilDone" },
|
|
27
|
+
{ "trigger": "WaitUntilDone@", "contents": "WaitUntilDone@${1:5s}" },
|
|
26
28
|
|
|
27
29
|
// Control commands
|
|
28
30
|
"Clear",
|
|
@@ -40,10 +40,10 @@ contexts:
|
|
|
40
40
|
captures:
|
|
41
41
|
2: entity.name.function.demotape
|
|
42
42
|
|
|
43
|
-
# Commands with @ duration
|
|
44
|
-
- match: '\b(Type|TypeFile|WaitUntil|Run)\b'
|
|
43
|
+
# Commands with @ duration
|
|
44
|
+
- match: '\b(Type|TypeFile|WaitUntil|WaitUntilDone|Run)\b'
|
|
45
45
|
scope: keyword.control.demotape
|
|
46
|
-
push:
|
|
46
|
+
push: command_with_duration
|
|
47
47
|
|
|
48
48
|
# Set command with option value
|
|
49
49
|
- match: '\b(Set)\b'
|
|
@@ -97,7 +97,7 @@ contexts:
|
|
|
97
97
|
key_combo:
|
|
98
98
|
- match: '\+'
|
|
99
99
|
scope: keyword.operator.demotape
|
|
100
|
-
- match: '\b(Ctrl|Control|Alt|Option|Shift|Meta|Command|Enter|Return|Tab|Backspace|Delete|Escape|Esc|Space|Up|Down|Left|Right|Home|End|PageUp|PageDown|Insert|Cancel|Help|Pause|Semicolon|Colon|Equals|Slash|BackSlash|Numpad[0-9]|Multiply|Add|Separator|Subtract|Decimal|Divide|F[1-9]|F1[0-2]|[A-Za-z0-9])\b'
|
|
100
|
+
- match: '\b(Ctrl|Control|Alt|Option|Shift|Meta|Command|Cmd|Enter|Return|Tab|Backspace|Delete|Escape|Esc|Space|Up|Down|Left|Right|Home|End|PageUp|PageDown|Insert|Cancel|Help|Pause|Semicolon|Colon|Equals|Slash|BackSlash|Numpad[0-9]|Multiply|Add|Separator|Subtract|Decimal|Divide|F[1-9]|F1[0-2]|[A-Za-z0-9])\b'
|
|
101
101
|
scope: keyword.control.demotape
|
|
102
102
|
- match: '\d+'
|
|
103
103
|
scope: constant.numeric.integer.demotape
|
|
@@ -145,7 +145,7 @@ contexts:
|
|
|
145
145
|
- match: "$"
|
|
146
146
|
pop: true
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
command_with_duration:
|
|
149
149
|
- match: "@"
|
|
150
150
|
scope: keyword.operator.demotape
|
|
151
151
|
push: duration_value
|
|
@@ -11,7 +11,7 @@ endif
|
|
|
11
11
|
syn match demotapeComment "#.*$"
|
|
12
12
|
|
|
13
13
|
" Commands
|
|
14
|
-
syn keyword demotapeCommand Type TypeFile WaitUntil Run Set Output Copy Paste Send Include Screenshot
|
|
14
|
+
syn keyword demotapeCommand Type TypeFile WaitUntil WaitUntilDone Run Set Output Copy Paste Send Include Screenshot
|
|
15
15
|
syn keyword demotapeCommand Wait Sleep Require Pause Resume Clear nextgroup=demotapeString,demotapeDuration,demotapeNumber skipwhite
|
|
16
16
|
|
|
17
17
|
" Group blocks
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
|
-
"comment": "Commands with @ duration
|
|
49
|
-
"match": "\\b(Type|TypeFile|WaitUntil|Run)\\b",
|
|
48
|
+
"comment": "Commands with @ duration",
|
|
49
|
+
"match": "\\b(Type|TypeFile|WaitUntil|WaitUntilDone|Run)\\b",
|
|
50
50
|
"name": "keyword.control.demotape",
|
|
51
51
|
"captures": {
|
|
52
52
|
"1": { "name": "keyword.control.demotape" }
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
"comment": "Key combinations with +",
|
|
103
|
-
"match": "\\b(Ctrl|Control|Alt|Option|Shift|Meta|Command|Enter|Return|Tab|Backspace|Delete|Escape|Esc|Space|Up|Down|Left|Right|Home|End|PageUp|PageDown|Insert|Cancel|Help|Pause|Semicolon|Colon|Equals|Slash|BackSlash|Numpad[0-9]|Multiply|Add|Separator|Subtract|Decimal|Divide|F[1-9]|F1[0-2]|[A-Za-z0-9])\\s*\\+\\s*(Ctrl|Control|Alt|Option|Shift|Meta|Command|Enter|Return|Tab|Backspace|Delete|Escape|Esc|Space|Up|Down|Left|Right|Home|End|PageUp|PageDown|Insert|Cancel|Help|Pause|Semicolon|Colon|Equals|Slash|Numpad[0-9]|Multiply|Add|Separator|Subtract|Decimal|Divide|F[1-9]|F1[0-2]|[A-Za-z0-9])",
|
|
103
|
+
"match": "\\b(Ctrl|Control|Alt|Option|Shift|Meta|Command|Cmd|Enter|Return|Tab|Backspace|Delete|Escape|Esc|Space|Up|Down|Left|Right|Home|End|PageUp|PageDown|Insert|Cancel|Help|Pause|Semicolon|Colon|Equals|Slash|BackSlash|Numpad[0-9]|Multiply|Add|Separator|Subtract|Decimal|Divide|F[1-9]|F1[0-2]|[A-Za-z0-9])\\s*\\+\\s*(Ctrl|Control|Alt|Option|Shift|Meta|Command|Cmd|Enter|Return|Tab|Backspace|Delete|Escape|Esc|Space|Up|Down|Left|Right|Home|End|PageUp|PageDown|Insert|Cancel|Help|Pause|Semicolon|Colon|Equals|Slash|Numpad[0-9]|Multiply|Add|Separator|Subtract|Decimal|Divide|F[1-9]|F1[0-2]|[A-Za-z0-9])",
|
|
104
104
|
"captures": {
|
|
105
105
|
"0": { "name": "keyword.control.demotape" }
|
|
106
106
|
}
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
|
-
"comment": "At symbol for
|
|
122
|
+
"comment": "At symbol for duration",
|
|
123
123
|
"match": "@",
|
|
124
124
|
"name": "keyword.operator.demotape"
|
|
125
125
|
},
|
data/editors/vscode/package.json
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
"name": "demotape",
|
|
3
3
|
"displayName": "Demo Tape",
|
|
4
4
|
"description": "Syntax highlighting for DemoTape (.tape) files",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.3",
|
|
6
6
|
"publisher": "fnando",
|
|
7
7
|
"icon": "icon.png",
|
|
8
8
|
"license": "MIT",
|
|
9
|
-
"publisher": "fnando",
|
|
10
9
|
"repository": {
|
|
11
10
|
"url": "https://github.com/fnando/demotape"
|
|
12
11
|
},
|
|
@@ -16,7 +15,8 @@
|
|
|
16
15
|
"files": [
|
|
17
16
|
"*.json",
|
|
18
17
|
"*.png",
|
|
19
|
-
"
|
|
18
|
+
"LICENSE.md",
|
|
19
|
+
"README.md"
|
|
20
20
|
],
|
|
21
21
|
"categories": [
|
|
22
22
|
"Programming Languages"
|
|
Binary file
|
|
@@ -36,6 +36,7 @@ module.exports = grammar({
|
|
|
36
36
|
command: $ => choice(
|
|
37
37
|
$.type_command,
|
|
38
38
|
$.run_command,
|
|
39
|
+
$.wait_until_done_command,
|
|
39
40
|
$.wait_until_command,
|
|
40
41
|
$.type_file_command,
|
|
41
42
|
$.set_command,
|
|
@@ -81,6 +82,12 @@ module.exports = grammar({
|
|
|
81
82
|
field('command', $.string),
|
|
82
83
|
),
|
|
83
84
|
|
|
85
|
+
// WaitUntilDone command
|
|
86
|
+
wait_until_done_command: $ => seq(
|
|
87
|
+
'WaitUntilDone',
|
|
88
|
+
optional($.duration_modifier),
|
|
89
|
+
),
|
|
90
|
+
|
|
84
91
|
// WaitUntil command
|
|
85
92
|
wait_until_command: $ => seq(
|
|
86
93
|
'WaitUntil',
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "demotape",
|
|
3
3
|
"version": "0.0.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
|
-
"name": "
|
|
8
|
+
"name": "demotape",
|
|
9
9
|
"version": "0.0.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
@@ -93,6 +93,10 @@
|
|
|
93
93
|
"type": "SYMBOL",
|
|
94
94
|
"name": "run_command"
|
|
95
95
|
},
|
|
96
|
+
{
|
|
97
|
+
"type": "SYMBOL",
|
|
98
|
+
"name": "wait_until_done_command"
|
|
99
|
+
},
|
|
96
100
|
{
|
|
97
101
|
"type": "SYMBOL",
|
|
98
102
|
"name": "wait_until_command"
|
|
@@ -263,6 +267,27 @@
|
|
|
263
267
|
}
|
|
264
268
|
]
|
|
265
269
|
},
|
|
270
|
+
"wait_until_done_command": {
|
|
271
|
+
"type": "SEQ",
|
|
272
|
+
"members": [
|
|
273
|
+
{
|
|
274
|
+
"type": "STRING",
|
|
275
|
+
"value": "WaitUntilDone"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"type": "CHOICE",
|
|
279
|
+
"members": [
|
|
280
|
+
{
|
|
281
|
+
"type": "SYMBOL",
|
|
282
|
+
"name": "duration_modifier"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"type": "BLANK"
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
]
|
|
290
|
+
},
|
|
266
291
|
"wait_until_command": {
|
|
267
292
|
"type": "SEQ",
|
|
268
293
|
"members": [
|
|
@@ -895,6 +920,10 @@
|
|
|
895
920
|
{
|
|
896
921
|
"type": "STRING",
|
|
897
922
|
"value": "Command"
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
"type": "STRING",
|
|
926
|
+
"value": "Cmd"
|
|
898
927
|
}
|
|
899
928
|
]
|
|
900
929
|
},
|
|
@@ -87,6 +87,10 @@
|
|
|
87
87
|
{
|
|
88
88
|
"type": "wait_until_command",
|
|
89
89
|
"named": true
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "wait_until_done_command",
|
|
93
|
+
"named": true
|
|
90
94
|
}
|
|
91
95
|
]
|
|
92
96
|
}
|
|
@@ -559,6 +563,21 @@
|
|
|
559
563
|
]
|
|
560
564
|
}
|
|
561
565
|
},
|
|
566
|
+
{
|
|
567
|
+
"type": "wait_until_done_command",
|
|
568
|
+
"named": true,
|
|
569
|
+
"fields": {},
|
|
570
|
+
"children": {
|
|
571
|
+
"multiple": false,
|
|
572
|
+
"required": false,
|
|
573
|
+
"types": [
|
|
574
|
+
{
|
|
575
|
+
"type": "duration_modifier",
|
|
576
|
+
"named": true
|
|
577
|
+
}
|
|
578
|
+
]
|
|
579
|
+
}
|
|
580
|
+
},
|
|
562
581
|
{
|
|
563
582
|
"type": "\"",
|
|
564
583
|
"named": false
|
|
@@ -603,6 +622,10 @@
|
|
|
603
622
|
"type": "Cancel",
|
|
604
623
|
"named": false
|
|
605
624
|
},
|
|
625
|
+
{
|
|
626
|
+
"type": "Cmd",
|
|
627
|
+
"named": false
|
|
628
|
+
},
|
|
606
629
|
{
|
|
607
630
|
"type": "Colon",
|
|
608
631
|
"named": false
|
|
@@ -787,6 +810,10 @@
|
|
|
787
810
|
"type": "WaitUntil",
|
|
788
811
|
"named": false
|
|
789
812
|
},
|
|
813
|
+
{
|
|
814
|
+
"type": "WaitUntilDone",
|
|
815
|
+
"named": false
|
|
816
|
+
},
|
|
790
817
|
{
|
|
791
818
|
"type": "clear_command",
|
|
792
819
|
"named": true
|