@konomanoasa/tree-sitter-diagnostic-sh 0.6.0 → 0.7.0
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.
- package/Cargo.toml +1 -1
- package/package.json +1 -1
- package/src/parser.c +1 -1
- package/src/scanner.c +12 -3
- package/test/support/parser-cases.json +702 -93
- package/tree-sitter.json +1 -1
package/Cargo.toml
CHANGED
package/package.json
CHANGED
package/src/parser.c
CHANGED
|
@@ -15210,7 +15210,7 @@ TS_PUBLIC const TSLanguage *tree_sitter_diagnostic_sh(void) {
|
|
|
15210
15210
|
.max_reserved_word_set_size = 0,
|
|
15211
15211
|
.metadata = {
|
|
15212
15212
|
.major_version = 0,
|
|
15213
|
-
.minor_version =
|
|
15213
|
+
.minor_version = 7,
|
|
15214
15214
|
.patch_version = 0,
|
|
15215
15215
|
},
|
|
15216
15216
|
};
|
package/src/scanner.c
CHANGED
|
@@ -2426,12 +2426,21 @@ arithmetic_valid(struct Plan *plan, const struct Text *content, bool open) {
|
|
|
2426
2426
|
plan->failed = true;
|
|
2427
2427
|
return false;
|
|
2428
2428
|
}
|
|
2429
|
-
|
|
2430
|
-
|
|
2429
|
+
bool has_quote = false, arithmetic_characters = true;
|
|
2430
|
+
for (size_t i = 0; i < content->count; i++) {
|
|
2431
|
+
int32_t c = content->units[i].value;
|
|
2432
|
+
values[i] = c;
|
|
2433
|
+
if (c == '\'' || c == '"') has_quote = true;
|
|
2434
|
+
else if (c != -1 && arithmetic_lex(LEX_START, c) == LEX_INVALID)
|
|
2435
|
+
arithmetic_characters = false;
|
|
2436
|
+
}
|
|
2431
2437
|
size_t length = content->count;
|
|
2432
2438
|
// An EOF continuation acts as an expansion hole.
|
|
2433
2439
|
if (open) values[length++] = -1;
|
|
2434
|
-
enum ArithmeticValidation validation =
|
|
2440
|
+
enum ArithmeticValidation validation = has_quote
|
|
2441
|
+
? arithmetic_characters ? ARITHMETIC_VALIDATION_VALID
|
|
2442
|
+
: ARITHMETIC_VALIDATION_INVALID
|
|
2443
|
+
: validate_arithmetic(values, length);
|
|
2435
2444
|
ts_free(values);
|
|
2436
2445
|
plan->failed |= validation == ARITHMETIC_VALIDATION_RESOURCE_FAILURE;
|
|
2437
2446
|
return validation == ARITHMETIC_VALIDATION_VALID;
|
|
@@ -95,6 +95,46 @@
|
|
|
95
95
|
}
|
|
96
96
|
]
|
|
97
97
|
},
|
|
98
|
+
{
|
|
99
|
+
"name": "quoted declarations and pattern words stay opaque inside a recovery region",
|
|
100
|
+
"source": "cat > ) \"export\" x=~${v:bad} [\"\"^a] [a\"/\"b]; cat >\n",
|
|
101
|
+
"expected": [
|
|
102
|
+
{
|
|
103
|
+
"owner": {
|
|
104
|
+
"kind": "io_redirect",
|
|
105
|
+
"start": 4,
|
|
106
|
+
"end": 43
|
|
107
|
+
},
|
|
108
|
+
"range": [6, 43],
|
|
109
|
+
"fault": {
|
|
110
|
+
"kind": "invalid_redirection_target",
|
|
111
|
+
"range": [6, 7]
|
|
112
|
+
},
|
|
113
|
+
"boundary": {
|
|
114
|
+
"kind": "recovery_resume",
|
|
115
|
+
"range": [43, 43]
|
|
116
|
+
},
|
|
117
|
+
"fragments": [[7, 43]]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"owner": {
|
|
121
|
+
"kind": "io_redirect",
|
|
122
|
+
"start": 49,
|
|
123
|
+
"end": 50
|
|
124
|
+
},
|
|
125
|
+
"range": [50, 50],
|
|
126
|
+
"fault": {
|
|
127
|
+
"kind": "redirection_target_gap",
|
|
128
|
+
"range": [50, 50]
|
|
129
|
+
},
|
|
130
|
+
"boundary": {
|
|
131
|
+
"kind": "recovery_resume",
|
|
132
|
+
"range": [50, 50]
|
|
133
|
+
},
|
|
134
|
+
"fragments": []
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
98
138
|
{
|
|
99
139
|
"name": "redirection target missing at EOF",
|
|
100
140
|
"source": "cat >",
|
|
@@ -2961,9 +3001,139 @@
|
|
|
2961
3001
|
"source": "alias while='if'; unknown --arbitrary; echo \"$unknown\" \"${x:?message}\" \"[[:unknown:]]\" \"${x%[a-}\"\n",
|
|
2962
3002
|
"expected": []
|
|
2963
3003
|
},
|
|
3004
|
+
{
|
|
3005
|
+
"name": "quoted and escaped declaration names and forwarding words are accepted",
|
|
3006
|
+
"source": "\"export\" X=~; \\readonly Y=~/bin; ex\"port\" Z=~; ''export X=~\n$'\\x65xport' X=~; $'\\162eadonly' Y=~; \"command\" 'readonly' Z=~\ncom''mand >out command $'\\x65xport' X=~\n\"command\" <<END \"export\" X=~\nbody\nEND\n",
|
|
3007
|
+
"expected": []
|
|
3008
|
+
},
|
|
3009
|
+
{
|
|
3010
|
+
"name": "command options and dynamic utility names remain valid ordinary words",
|
|
3011
|
+
"source": "command -p \"export\" X=~; command -- \"readonly\" Y=~\n\"$cmd\" X=~; command \"${cmd:-export}\" Y=~\n$(printf export) X=~; `printf readonly` Y=~\n",
|
|
3012
|
+
"expected": []
|
|
3013
|
+
},
|
|
3014
|
+
{
|
|
3015
|
+
"name": "a parameter fault after tilde in a quoted declaration resumes before later arguments",
|
|
3016
|
+
"source": "\"export\" x=~${v:bad} y=~; cat >\n",
|
|
3017
|
+
"expected": [
|
|
3018
|
+
{
|
|
3019
|
+
"owner": {
|
|
3020
|
+
"kind": "parameter_expansion",
|
|
3021
|
+
"start": 12,
|
|
3022
|
+
"end": 20
|
|
3023
|
+
},
|
|
3024
|
+
"range": [16, 19],
|
|
3025
|
+
"fault": {
|
|
3026
|
+
"kind": "parameter_operator_error",
|
|
3027
|
+
"range": [16, 17]
|
|
3028
|
+
},
|
|
3029
|
+
"boundary": {
|
|
3030
|
+
"kind": "recovery_resume",
|
|
3031
|
+
"range": [19, 19]
|
|
3032
|
+
},
|
|
3033
|
+
"fragments": [[17, 19]]
|
|
3034
|
+
},
|
|
3035
|
+
{
|
|
3036
|
+
"owner": {
|
|
3037
|
+
"kind": "io_redirect",
|
|
3038
|
+
"start": 30,
|
|
3039
|
+
"end": 31
|
|
3040
|
+
},
|
|
3041
|
+
"range": [31, 31],
|
|
3042
|
+
"fault": {
|
|
3043
|
+
"kind": "redirection_target_gap",
|
|
3044
|
+
"range": [31, 31]
|
|
3045
|
+
},
|
|
3046
|
+
"boundary": {
|
|
3047
|
+
"kind": "recovery_resume",
|
|
3048
|
+
"range": [31, 31]
|
|
3049
|
+
},
|
|
3050
|
+
"fragments": []
|
|
3051
|
+
}
|
|
3052
|
+
]
|
|
3053
|
+
},
|
|
3054
|
+
{
|
|
3055
|
+
"name": "a dynamic utility name retains its parameter fault and the following command fault",
|
|
3056
|
+
"source": "\"${cmd:bad}\" x=~; cat >\n",
|
|
3057
|
+
"expected": [
|
|
3058
|
+
{
|
|
3059
|
+
"owner": {
|
|
3060
|
+
"kind": "parameter_expansion",
|
|
3061
|
+
"start": 1,
|
|
3062
|
+
"end": 11
|
|
3063
|
+
},
|
|
3064
|
+
"range": [7, 10],
|
|
3065
|
+
"fault": {
|
|
3066
|
+
"kind": "parameter_operator_error",
|
|
3067
|
+
"range": [7, 8]
|
|
3068
|
+
},
|
|
3069
|
+
"boundary": {
|
|
3070
|
+
"kind": "recovery_resume",
|
|
3071
|
+
"range": [10, 10]
|
|
3072
|
+
},
|
|
3073
|
+
"fragments": [[8, 10]]
|
|
3074
|
+
},
|
|
3075
|
+
{
|
|
3076
|
+
"owner": {
|
|
3077
|
+
"kind": "io_redirect",
|
|
3078
|
+
"start": 22,
|
|
3079
|
+
"end": 23
|
|
3080
|
+
},
|
|
3081
|
+
"range": [23, 23],
|
|
3082
|
+
"fault": {
|
|
3083
|
+
"kind": "redirection_target_gap",
|
|
3084
|
+
"range": [23, 23]
|
|
3085
|
+
},
|
|
3086
|
+
"boundary": {
|
|
3087
|
+
"kind": "recovery_resume",
|
|
3088
|
+
"range": [23, 23]
|
|
3089
|
+
},
|
|
3090
|
+
"fragments": []
|
|
3091
|
+
}
|
|
3092
|
+
]
|
|
3093
|
+
},
|
|
3094
|
+
{
|
|
3095
|
+
"name": "a forwarded dollar-quoted name retains its escape fault and the following command fault",
|
|
3096
|
+
"source": "\"command\" $'read\\c\\qonly' x=~; cat >\n",
|
|
3097
|
+
"expected": [
|
|
3098
|
+
{
|
|
3099
|
+
"owner": {
|
|
3100
|
+
"kind": "dollar_single_quote_escape",
|
|
3101
|
+
"start": 16,
|
|
3102
|
+
"end": 20
|
|
3103
|
+
},
|
|
3104
|
+
"range": [16, 20],
|
|
3105
|
+
"fault": {
|
|
3106
|
+
"kind": "invalid_control_escape",
|
|
3107
|
+
"range": [16, 20]
|
|
3108
|
+
},
|
|
3109
|
+
"boundary": {
|
|
3110
|
+
"kind": "recovery_resume",
|
|
3111
|
+
"range": [20, 20]
|
|
3112
|
+
},
|
|
3113
|
+
"fragments": []
|
|
3114
|
+
},
|
|
3115
|
+
{
|
|
3116
|
+
"owner": {
|
|
3117
|
+
"kind": "io_redirect",
|
|
3118
|
+
"start": 35,
|
|
3119
|
+
"end": 36
|
|
3120
|
+
},
|
|
3121
|
+
"range": [36, 36],
|
|
3122
|
+
"fault": {
|
|
3123
|
+
"kind": "redirection_target_gap",
|
|
3124
|
+
"range": [36, 36]
|
|
3125
|
+
},
|
|
3126
|
+
"boundary": {
|
|
3127
|
+
"kind": "recovery_resume",
|
|
3128
|
+
"range": [36, 36]
|
|
3129
|
+
},
|
|
3130
|
+
"fragments": []
|
|
3131
|
+
}
|
|
3132
|
+
]
|
|
3133
|
+
},
|
|
2964
3134
|
{
|
|
2965
3135
|
"name": "utility operand constraints do not become source syntax faults",
|
|
2966
|
-
"source": "for i in \"$@\"; do break 99; done; export 1bad; shift -2; command missing\n",
|
|
3136
|
+
"source": "for i in \"$@\"; do break 99; done; export 1bad; shift -2; command missing\n\"export\" 1bad x+=1; \\readonly 1=bad; \"command\" \"export\" \"x=bad\"\n",
|
|
2967
3137
|
"expected": []
|
|
2968
3138
|
},
|
|
2969
3139
|
{
|
|
@@ -8294,13 +8464,13 @@
|
|
|
8294
8464
|
"expected": []
|
|
8295
8465
|
},
|
|
8296
8466
|
{
|
|
8297
|
-
"name": "normal pattern_words:
|
|
8298
|
-
"source": "printf a[b/c]d [[:not_a_posix_name:]]\n",
|
|
8467
|
+
"name": "normal pattern_words: static slashes and unknown classes do not cause syntax faults",
|
|
8468
|
+
"source": "printf a[b/c]d [[:not_a_posix_name:]]\n: [a*/b[xy] [a*\"/\"b[xy] [a*\\/b[xy] [a*$'\\x2f'b[xy] [a*/b?] [a*]/b[xy]\n",
|
|
8299
8469
|
"expected": []
|
|
8300
8470
|
},
|
|
8301
8471
|
{
|
|
8302
8472
|
"name": "normal case_patterns: case alternatives reuse pattern source nodes",
|
|
8303
|
-
"source": "case \"$value\" in\n (src/*.c | file?.[ch]) printf match ;;\n '*' | \\? | \"[abc]\") printf quoted ;;\n ${prefix}*) printf expanded ;;\nesac\n",
|
|
8473
|
+
"source": "case \"$value\" in\n (src/*.c | file?.[ch]) printf match ;;\n '*' | \\? | \"[abc]\") printf quoted ;;\n ${prefix}*) printf expanded ;;\nesac\ncase x in [''^a]|[^]]|[^]|[a/b]|[a\"/\"b]|[a\\/b]|[a$'\\x2f'b]) :;; esac\n",
|
|
8304
8474
|
"expected": []
|
|
8305
8475
|
},
|
|
8306
8476
|
{
|
|
@@ -8334,8 +8504,8 @@
|
|
|
8334
8504
|
"expected": []
|
|
8335
8505
|
},
|
|
8336
8506
|
{
|
|
8337
|
-
"name": "normal bracket_expressions: bracket
|
|
8338
|
-
"source": "printf [a] [abc] [!a-z] []-] [a-zA-Z] [^a] [*?] [a-*] [*-z] [[:alpha:]] [[.ch.]] [[=a=]] [[.a.]-[.z.]]\n",
|
|
8507
|
+
"name": "normal bracket_expressions: bracket members and negation spellings are accepted",
|
|
8508
|
+
"source": "printf [a] [abc] [!a-z] []-] [a-zA-Z] [^a] [*?] [a-*] [*-z] [[:alpha:]] [[.ch.]] [[=a=]] [[.a.]-[.z.]]\n: [''^a] [\"\"!a] [^]] [^] [!'']] [^\"\"]] [\\^a] ['^'a] [\"^\"a] [a^] [!^a]\n",
|
|
8339
8509
|
"expected": []
|
|
8340
8510
|
},
|
|
8341
8511
|
{
|
|
@@ -8370,7 +8540,7 @@
|
|
|
8370
8540
|
},
|
|
8371
8541
|
{
|
|
8372
8542
|
"name": "normal bracket_expressions: bracket expressions retain nested expansion source",
|
|
8373
|
-
"source": "printf [${chars}] [$(printf x)] [$((1 + 1))] [a\"$value\"b] [a\"$(printf ']')\"b]\n",
|
|
8543
|
+
"source": "printf [${chars}] [$(printf x)] [$((1 + 1))] [a\"$value\"b] [a\"$(printf ']')\"b]\necho \"${value#[''^a]}\" ${value#[^]]} \"${value#[^]}\" \"${value#[a\"/\"b]}\" ${value#[a\\/b]} ${value#[a$'\\x2f'b]}\n",
|
|
8374
8544
|
"expected": []
|
|
8375
8545
|
},
|
|
8376
8546
|
{
|
|
@@ -8465,7 +8635,7 @@
|
|
|
8465
8635
|
},
|
|
8466
8636
|
{
|
|
8467
8637
|
"name": "normal bracket_expressions: pattern operators remain source after an incomplete bracket opener",
|
|
8468
|
-
"source": "echo [* [?\n",
|
|
8638
|
+
"source": "echo [* [?\n: [a* [a\\]* [a\"]\"* [a]*[ [a\"*\" a*[/b*\n",
|
|
8469
8639
|
"expected": []
|
|
8470
8640
|
},
|
|
8471
8641
|
{
|
|
@@ -8534,140 +8704,306 @@
|
|
|
8534
8704
|
"expected": []
|
|
8535
8705
|
},
|
|
8536
8706
|
{
|
|
8537
|
-
"name": "
|
|
8538
|
-
"source": "echo
|
|
8539
|
-
"expected": []
|
|
8540
|
-
},
|
|
8541
|
-
{
|
|
8542
|
-
"name": "normal tilde_expansions: tilde prefixes are structured only where expansion can occur",
|
|
8543
|
-
"source": "printf ~ ~user ~/path x~user\nPATH=~bin:/usr/bin:~other/bin command\nprintf \"${value:-~fallback}\"\n",
|
|
8544
|
-
"expected": []
|
|
8545
|
-
},
|
|
8546
|
-
{
|
|
8547
|
-
"name": "normal tilde_expansions: tilde users retain every structured candidate before the formal delimiter",
|
|
8548
|
-
"source": "printf ~\"$name/quoted\"/tail ~'single/name'/tail ~$'dollar/name'/tail ~\\/escaped/tail ~$name/tail ~${name}/tail ~$(printf command/name)/tail ~$((1 / 2))/tail ~`printf backquote/name`/tail ~日本%+/tail\nPATH=~$(printf first/name):~\"second/name\"/bin command\nprintf ${value:-~$(printf parameter/name)/tail} ${value:-~$(printf terminal/name)}\n",
|
|
8549
|
-
"expected": []
|
|
8550
|
-
},
|
|
8551
|
-
{
|
|
8552
|
-
"name": "normal tilde_expansions: tilde prefixes stop at unquoted delimiters inside bracket source",
|
|
8553
|
-
"source": ": ~[/]\nx=~[:]\n",
|
|
8554
|
-
"expected": []
|
|
8555
|
-
},
|
|
8556
|
-
{
|
|
8557
|
-
"name": "normal tilde_expansions: a removed newline after a tilde prefix ends the prefix",
|
|
8558
|
-
"source": "echo ~user\\\n next\na=~user\\\n cmd\n",
|
|
8559
|
-
"expected": []
|
|
8560
|
-
},
|
|
8561
|
-
{
|
|
8562
|
-
"name": "normal tilde_expansions: assignment tildes take precedence over complete and incomplete bracket source",
|
|
8563
|
-
"source": "A=[a:~/x] B=[[:~user]/x] C=[a:~/x D=[a\\:~/x]\n",
|
|
8564
|
-
"expected": []
|
|
8565
|
-
},
|
|
8566
|
-
{
|
|
8567
|
-
"name": "normal tilde_expansions: nested backquote closers end assignment and argument tilde prefixes",
|
|
8568
|
-
"source": ": `: \\`A=~x\\``\n: `: \\`: ~x\\``\n",
|
|
8569
|
-
"expected": []
|
|
8570
|
-
},
|
|
8571
|
-
{
|
|
8572
|
-
"name": "normal tilde_expansions: encoded continuations end argument and assignment tilde users",
|
|
8573
|
-
"source": ": `: ~user\\\\\n :`\n: `A=~user\\\\\n :`\n",
|
|
8574
|
-
"expected": []
|
|
8575
|
-
},
|
|
8576
|
-
{
|
|
8577
|
-
"name": "empty parameter preserves the real closing brace",
|
|
8578
|
-
"source": "echo ${}; echo ok\n",
|
|
8707
|
+
"name": "empty quotes before caret do not hide a subsequent unfinished quote",
|
|
8708
|
+
"source": "echo [''^\"a",
|
|
8579
8709
|
"expected": [
|
|
8580
8710
|
{
|
|
8581
8711
|
"owner": {
|
|
8582
|
-
"kind": "
|
|
8583
|
-
"start":
|
|
8712
|
+
"kind": "double_quoted",
|
|
8713
|
+
"start": 9,
|
|
8714
|
+
"end": 11
|
|
8584
8715
|
},
|
|
8585
|
-
"range": [
|
|
8716
|
+
"range": [11, 11],
|
|
8586
8717
|
"fault": {
|
|
8587
|
-
"kind": "
|
|
8588
|
-
"range": [
|
|
8718
|
+
"kind": "double_quote_gap",
|
|
8719
|
+
"range": [11, 11]
|
|
8589
8720
|
},
|
|
8590
8721
|
"boundary": {
|
|
8591
|
-
"kind": "
|
|
8592
|
-
"range": [
|
|
8722
|
+
"kind": "recovery_eof",
|
|
8723
|
+
"range": [11, 11]
|
|
8593
8724
|
},
|
|
8594
8725
|
"fragments": []
|
|
8595
8726
|
}
|
|
8596
8727
|
]
|
|
8597
8728
|
},
|
|
8598
8729
|
{
|
|
8599
|
-
"name": "
|
|
8600
|
-
"source": "echo ${
|
|
8730
|
+
"name": "an incomplete filename bracket after a quoted slash retains its parameter fault",
|
|
8731
|
+
"source": "echo [a*\"/\"${v:bad}\ncat >\n",
|
|
8601
8732
|
"expected": [
|
|
8602
8733
|
{
|
|
8603
8734
|
"owner": {
|
|
8604
8735
|
"kind": "parameter_expansion",
|
|
8605
|
-
"start":
|
|
8736
|
+
"start": 11,
|
|
8737
|
+
"end": 19
|
|
8606
8738
|
},
|
|
8607
|
-
"range": [
|
|
8739
|
+
"range": [15, 18],
|
|
8608
8740
|
"fault": {
|
|
8609
8741
|
"kind": "parameter_operator_error",
|
|
8610
|
-
"range": [
|
|
8742
|
+
"range": [15, 16]
|
|
8611
8743
|
},
|
|
8612
8744
|
"boundary": {
|
|
8613
8745
|
"kind": "recovery_resume",
|
|
8614
|
-
"range": [
|
|
8746
|
+
"range": [18, 18]
|
|
8615
8747
|
},
|
|
8616
|
-
"fragments": [[
|
|
8617
|
-
}
|
|
8618
|
-
]
|
|
8619
|
-
},
|
|
8620
|
-
{
|
|
8621
|
-
"name": "non-POSIX parameter substitution is a structural operator fault",
|
|
8622
|
-
"source": "echo ${x/a/b}; echo ok\n",
|
|
8623
|
-
"expected": [
|
|
8748
|
+
"fragments": [[16, 18]]
|
|
8749
|
+
},
|
|
8624
8750
|
{
|
|
8625
8751
|
"owner": {
|
|
8626
|
-
"kind": "
|
|
8627
|
-
"start":
|
|
8752
|
+
"kind": "io_redirect",
|
|
8753
|
+
"start": 24,
|
|
8754
|
+
"end": 25
|
|
8628
8755
|
},
|
|
8629
|
-
"range": [
|
|
8756
|
+
"range": [25, 25],
|
|
8630
8757
|
"fault": {
|
|
8631
|
-
"kind": "
|
|
8632
|
-
"range": [
|
|
8758
|
+
"kind": "redirection_target_gap",
|
|
8759
|
+
"range": [25, 25]
|
|
8633
8760
|
},
|
|
8634
8761
|
"boundary": {
|
|
8635
8762
|
"kind": "recovery_resume",
|
|
8636
|
-
"range": [
|
|
8763
|
+
"range": [25, 25]
|
|
8637
8764
|
},
|
|
8638
|
-
"fragments": [
|
|
8765
|
+
"fragments": []
|
|
8639
8766
|
}
|
|
8640
8767
|
]
|
|
8641
8768
|
},
|
|
8642
8769
|
{
|
|
8643
|
-
"name": "
|
|
8644
|
-
"source": "
|
|
8770
|
+
"name": "a caret case pattern retains its parameter fault and resumes after the clause",
|
|
8771
|
+
"source": "case x in [''^${v:bad}]) :;; esac\ncat >\n",
|
|
8645
8772
|
"expected": [
|
|
8646
8773
|
{
|
|
8647
8774
|
"owner": {
|
|
8648
8775
|
"kind": "parameter_expansion",
|
|
8649
|
-
"start":
|
|
8776
|
+
"start": 14,
|
|
8777
|
+
"end": 22
|
|
8650
8778
|
},
|
|
8651
|
-
"range": [
|
|
8779
|
+
"range": [18, 21],
|
|
8652
8780
|
"fault": {
|
|
8653
8781
|
"kind": "parameter_operator_error",
|
|
8654
|
-
"range": [
|
|
8782
|
+
"range": [18, 19]
|
|
8655
8783
|
},
|
|
8656
8784
|
"boundary": {
|
|
8657
8785
|
"kind": "recovery_resume",
|
|
8658
|
-
"range": [
|
|
8786
|
+
"range": [21, 21]
|
|
8659
8787
|
},
|
|
8660
|
-
"fragments": [[
|
|
8661
|
-
}
|
|
8662
|
-
]
|
|
8663
|
-
},
|
|
8664
|
-
{
|
|
8665
|
-
"name": "parameter without a closer reaches EOF",
|
|
8666
|
-
"source": "echo ${x",
|
|
8667
|
-
"expected": [
|
|
8788
|
+
"fragments": [[19, 21]]
|
|
8789
|
+
},
|
|
8668
8790
|
{
|
|
8669
8791
|
"owner": {
|
|
8670
|
-
"kind": "
|
|
8792
|
+
"kind": "io_redirect",
|
|
8793
|
+
"start": 38,
|
|
8794
|
+
"end": 39
|
|
8795
|
+
},
|
|
8796
|
+
"range": [39, 39],
|
|
8797
|
+
"fault": {
|
|
8798
|
+
"kind": "redirection_target_gap",
|
|
8799
|
+
"range": [39, 39]
|
|
8800
|
+
},
|
|
8801
|
+
"boundary": {
|
|
8802
|
+
"kind": "recovery_resume",
|
|
8803
|
+
"range": [39, 39]
|
|
8804
|
+
},
|
|
8805
|
+
"fragments": []
|
|
8806
|
+
}
|
|
8807
|
+
]
|
|
8808
|
+
},
|
|
8809
|
+
{
|
|
8810
|
+
"name": "a quoted parameter pattern containing a slash retains an inner parameter fault",
|
|
8811
|
+
"source": "echo \"${x#[a\"/\"${v:bad}]}\"\ncat >\n",
|
|
8812
|
+
"expected": [
|
|
8813
|
+
{
|
|
8814
|
+
"owner": {
|
|
8815
|
+
"kind": "parameter_expansion",
|
|
8816
|
+
"start": 15,
|
|
8817
|
+
"end": 23
|
|
8818
|
+
},
|
|
8819
|
+
"range": [19, 22],
|
|
8820
|
+
"fault": {
|
|
8821
|
+
"kind": "parameter_operator_error",
|
|
8822
|
+
"range": [19, 20]
|
|
8823
|
+
},
|
|
8824
|
+
"boundary": {
|
|
8825
|
+
"kind": "recovery_resume",
|
|
8826
|
+
"range": [22, 22]
|
|
8827
|
+
},
|
|
8828
|
+
"fragments": [[20, 22]]
|
|
8829
|
+
},
|
|
8830
|
+
{
|
|
8831
|
+
"owner": {
|
|
8832
|
+
"kind": "io_redirect",
|
|
8833
|
+
"start": 31,
|
|
8834
|
+
"end": 32
|
|
8835
|
+
},
|
|
8836
|
+
"range": [32, 32],
|
|
8837
|
+
"fault": {
|
|
8838
|
+
"kind": "redirection_target_gap",
|
|
8839
|
+
"range": [32, 32]
|
|
8840
|
+
},
|
|
8841
|
+
"boundary": {
|
|
8842
|
+
"kind": "recovery_resume",
|
|
8843
|
+
"range": [32, 32]
|
|
8844
|
+
},
|
|
8845
|
+
"fragments": []
|
|
8846
|
+
}
|
|
8847
|
+
]
|
|
8848
|
+
},
|
|
8849
|
+
{
|
|
8850
|
+
"name": "normal tilde_expansions: quoted and dynamic parameter words retain tilde source and shell separators",
|
|
8851
|
+
"source": "echo ${x:-~'a' b} ${x#~$u;b} ${x:-~$(echo a)\nb}\n",
|
|
8852
|
+
"expected": []
|
|
8853
|
+
},
|
|
8854
|
+
{
|
|
8855
|
+
"name": "normal tilde_expansions: tilde prefixes are structured only where expansion can occur",
|
|
8856
|
+
"source": "printf ~ ~user ~/path x~user\nPATH=~bin:/usr/bin:~other/bin command\nprintf \"${value:-~fallback}\"\n",
|
|
8857
|
+
"expected": []
|
|
8858
|
+
},
|
|
8859
|
+
{
|
|
8860
|
+
"name": "normal tilde_expansions: quoted and dynamic tilde prefixes remain ordinary word source",
|
|
8861
|
+
"source": "printf ~\"$name/quoted\"/tail ~'single/name'/tail ~$'dollar/name'/tail ~\\/escaped/tail ~$name/tail ~${name}/tail ~$(printf command/name)/tail ~$((1 / 2))/tail ~`printf backquote/name`/tail ~日本%+/tail\nPATH=~$(printf first/name):~\"second/name\"/bin command\nprintf ${value:-~$(printf parameter/name)/tail} ${value:-~$(printf terminal/name)}\nprintf ~'' ~\"\" ~ro\"ot\" ~\\root ~ro\\\not ~/\"$x\"\n",
|
|
8862
|
+
"expected": []
|
|
8863
|
+
},
|
|
8864
|
+
{
|
|
8865
|
+
"name": "normal tilde_expansions: tilde prefixes stop at unquoted delimiters inside bracket source",
|
|
8866
|
+
"source": ": ~[/]\nx=~[:]\n",
|
|
8867
|
+
"expected": []
|
|
8868
|
+
},
|
|
8869
|
+
{
|
|
8870
|
+
"name": "normal tilde_expansions: a removed newline after a tilde prefix ends the prefix",
|
|
8871
|
+
"source": "echo ~user\\\n next\na=~user\\\n cmd\n",
|
|
8872
|
+
"expected": []
|
|
8873
|
+
},
|
|
8874
|
+
{
|
|
8875
|
+
"name": "normal tilde_expansions: assignment tildes take precedence over complete and incomplete bracket source",
|
|
8876
|
+
"source": "A=[a:~/x] B=[[:~user]/x] C=[a:~/x D=[a\\:~/x]\nx=[a:~\"b\"] y=[a:~${name}]\n",
|
|
8877
|
+
"expected": []
|
|
8878
|
+
},
|
|
8879
|
+
{
|
|
8880
|
+
"name": "normal tilde_expansions: nested backquote closers end assignment and argument tilde prefixes",
|
|
8881
|
+
"source": ": `: \\`A=~x\\``\n: `: \\`: ~x\\``\n",
|
|
8882
|
+
"expected": []
|
|
8883
|
+
},
|
|
8884
|
+
{
|
|
8885
|
+
"name": "normal tilde_expansions: encoded continuations end argument and assignment tilde users",
|
|
8886
|
+
"source": ": `: ~user\\\\\n :`\n: `A=~user\\\\\n :`\n",
|
|
8887
|
+
"expected": []
|
|
8888
|
+
},
|
|
8889
|
+
{
|
|
8890
|
+
"name": "a quote in a tilde candidate still owns its missing ending",
|
|
8891
|
+
"source": "echo ~\"$x",
|
|
8892
|
+
"expected": [
|
|
8893
|
+
{
|
|
8894
|
+
"owner": {
|
|
8895
|
+
"kind": "double_quoted",
|
|
8896
|
+
"start": 6,
|
|
8897
|
+
"end": 9
|
|
8898
|
+
},
|
|
8899
|
+
"range": [9, 9],
|
|
8900
|
+
"fault": {
|
|
8901
|
+
"kind": "double_quote_gap",
|
|
8902
|
+
"range": [9, 9]
|
|
8903
|
+
},
|
|
8904
|
+
"boundary": {
|
|
8905
|
+
"kind": "recovery_eof",
|
|
8906
|
+
"range": [9, 9]
|
|
8907
|
+
},
|
|
8908
|
+
"fragments": []
|
|
8909
|
+
}
|
|
8910
|
+
]
|
|
8911
|
+
},
|
|
8912
|
+
{
|
|
8913
|
+
"name": "empty parameter preserves the real closing brace",
|
|
8914
|
+
"source": "echo ${}; echo ok\n",
|
|
8915
|
+
"expected": [
|
|
8916
|
+
{
|
|
8917
|
+
"owner": {
|
|
8918
|
+
"kind": "parameter_expansion",
|
|
8919
|
+
"start": 5
|
|
8920
|
+
},
|
|
8921
|
+
"range": [7, 7],
|
|
8922
|
+
"fault": {
|
|
8923
|
+
"kind": "parameter_name_gap",
|
|
8924
|
+
"range": [7, 7]
|
|
8925
|
+
},
|
|
8926
|
+
"boundary": {
|
|
8927
|
+
"kind": "recovery_resume",
|
|
8928
|
+
"range": [7, 7]
|
|
8929
|
+
},
|
|
8930
|
+
"fragments": []
|
|
8931
|
+
}
|
|
8932
|
+
]
|
|
8933
|
+
},
|
|
8934
|
+
{
|
|
8935
|
+
"name": "unsupported parameter operator keeps its opaque tail",
|
|
8936
|
+
"source": "echo ${x:bad}; echo ok\n",
|
|
8937
|
+
"expected": [
|
|
8938
|
+
{
|
|
8939
|
+
"owner": {
|
|
8940
|
+
"kind": "parameter_expansion",
|
|
8941
|
+
"start": 5
|
|
8942
|
+
},
|
|
8943
|
+
"range": [9, 12],
|
|
8944
|
+
"fault": {
|
|
8945
|
+
"kind": "parameter_operator_error",
|
|
8946
|
+
"range": [9, 10]
|
|
8947
|
+
},
|
|
8948
|
+
"boundary": {
|
|
8949
|
+
"kind": "recovery_resume",
|
|
8950
|
+
"range": [12, 12]
|
|
8951
|
+
},
|
|
8952
|
+
"fragments": [[10, 12]]
|
|
8953
|
+
}
|
|
8954
|
+
]
|
|
8955
|
+
},
|
|
8956
|
+
{
|
|
8957
|
+
"name": "non-POSIX parameter substitution is a structural operator fault",
|
|
8958
|
+
"source": "echo ${x/a/b}; echo ok\n",
|
|
8959
|
+
"expected": [
|
|
8960
|
+
{
|
|
8961
|
+
"owner": {
|
|
8962
|
+
"kind": "parameter_expansion",
|
|
8963
|
+
"start": 5
|
|
8964
|
+
},
|
|
8965
|
+
"range": [8, 12],
|
|
8966
|
+
"fault": {
|
|
8967
|
+
"kind": "parameter_operator_error",
|
|
8968
|
+
"range": [8, 9]
|
|
8969
|
+
},
|
|
8970
|
+
"boundary": {
|
|
8971
|
+
"kind": "recovery_resume",
|
|
8972
|
+
"range": [12, 12]
|
|
8973
|
+
},
|
|
8974
|
+
"fragments": [[9, 12]]
|
|
8975
|
+
}
|
|
8976
|
+
]
|
|
8977
|
+
},
|
|
8978
|
+
{
|
|
8979
|
+
"name": "nested parameter fault stops at its own brace",
|
|
8980
|
+
"source": "echo ${x:-${y:bad} other}; echo ok\n",
|
|
8981
|
+
"expected": [
|
|
8982
|
+
{
|
|
8983
|
+
"owner": {
|
|
8984
|
+
"kind": "parameter_expansion",
|
|
8985
|
+
"start": 10
|
|
8986
|
+
},
|
|
8987
|
+
"range": [14, 17],
|
|
8988
|
+
"fault": {
|
|
8989
|
+
"kind": "parameter_operator_error",
|
|
8990
|
+
"range": [14, 15]
|
|
8991
|
+
},
|
|
8992
|
+
"boundary": {
|
|
8993
|
+
"kind": "recovery_resume",
|
|
8994
|
+
"range": [17, 17]
|
|
8995
|
+
},
|
|
8996
|
+
"fragments": [[15, 17]]
|
|
8997
|
+
}
|
|
8998
|
+
]
|
|
8999
|
+
},
|
|
9000
|
+
{
|
|
9001
|
+
"name": "parameter without a closer reaches EOF",
|
|
9002
|
+
"source": "echo ${x",
|
|
9003
|
+
"expected": [
|
|
9004
|
+
{
|
|
9005
|
+
"owner": {
|
|
9006
|
+
"kind": "parameter_expansion",
|
|
8671
9007
|
"start": 5,
|
|
8672
9008
|
"end": 8
|
|
8673
9009
|
},
|
|
@@ -14044,5 +14380,278 @@
|
|
|
14044
14380
|
"fragments": []
|
|
14045
14381
|
}
|
|
14046
14382
|
]
|
|
14383
|
+
},
|
|
14384
|
+
{
|
|
14385
|
+
"name": "arithmetic quote source does not create shell quote gaps",
|
|
14386
|
+
"source": "echo $(( \"y\" = 1 )) $((1+\"2\")) $((1+'2')) $((1+')) $((1+\")) \"$(('1'+2))\"\n",
|
|
14387
|
+
"expected": []
|
|
14388
|
+
},
|
|
14389
|
+
{
|
|
14390
|
+
"name": "arithmetic quote source retains nested expansion and substitution boundaries",
|
|
14391
|
+
"source": "echo $((\"$x\"+('1'+${y:-\"2\"})+$(printf '3')+`printf '4'`+$((1+\"5\"))))\necho \"${x:-$(('1'))}\" $(echo $((\"1\"))) `echo $(('1'))`\ncat <<END\n$((\"1\"))\nEND\n",
|
|
14392
|
+
"expected": []
|
|
14393
|
+
},
|
|
14394
|
+
{
|
|
14395
|
+
"name": "arithmetic quote source retains numeric fragments without evaluating them",
|
|
14396
|
+
"source": "echo $((\"08\")) $((\"0x\")) $((\"1\"++)) $((++'1')) $((\"1\"+)) $((\"1\" 2))\n",
|
|
14397
|
+
"expected": []
|
|
14398
|
+
},
|
|
14399
|
+
{
|
|
14400
|
+
"name": "arithmetic quote source at EOF reports its arithmetic ending gap",
|
|
14401
|
+
"source": "echo $((\"1",
|
|
14402
|
+
"expected": [
|
|
14403
|
+
{
|
|
14404
|
+
"owner": {
|
|
14405
|
+
"kind": "arithmetic_expansion",
|
|
14406
|
+
"start": 5,
|
|
14407
|
+
"end": 10
|
|
14408
|
+
},
|
|
14409
|
+
"range": [10, 10],
|
|
14410
|
+
"fault": {
|
|
14411
|
+
"kind": "arithmetic_ending_gap",
|
|
14412
|
+
"range": [10, 10]
|
|
14413
|
+
},
|
|
14414
|
+
"boundary": {
|
|
14415
|
+
"kind": "recovery_eof",
|
|
14416
|
+
"range": [10, 10]
|
|
14417
|
+
},
|
|
14418
|
+
"fragments": []
|
|
14419
|
+
}
|
|
14420
|
+
]
|
|
14421
|
+
},
|
|
14422
|
+
{
|
|
14423
|
+
"name": "arithmetic quote source at one closing parenthesis reports its arithmetic ending gap",
|
|
14424
|
+
"source": "echo $((\"1\")",
|
|
14425
|
+
"expected": [
|
|
14426
|
+
{
|
|
14427
|
+
"owner": {
|
|
14428
|
+
"kind": "arithmetic_expansion",
|
|
14429
|
+
"start": 5,
|
|
14430
|
+
"end": 12
|
|
14431
|
+
},
|
|
14432
|
+
"range": [12, 12],
|
|
14433
|
+
"fault": {
|
|
14434
|
+
"kind": "arithmetic_ending_gap",
|
|
14435
|
+
"range": [12, 12]
|
|
14436
|
+
},
|
|
14437
|
+
"boundary": {
|
|
14438
|
+
"kind": "recovery_eof",
|
|
14439
|
+
"range": [12, 12]
|
|
14440
|
+
},
|
|
14441
|
+
"fragments": []
|
|
14442
|
+
}
|
|
14443
|
+
]
|
|
14444
|
+
},
|
|
14445
|
+
{
|
|
14446
|
+
"name": "arithmetic quote source preserves a parameter fault and the following command fault",
|
|
14447
|
+
"source": "echo $((\"1\"+${x:bad}))\ncat >\n",
|
|
14448
|
+
"expected": [
|
|
14449
|
+
{
|
|
14450
|
+
"owner": {
|
|
14451
|
+
"kind": "parameter_expansion",
|
|
14452
|
+
"start": 12,
|
|
14453
|
+
"end": 20
|
|
14454
|
+
},
|
|
14455
|
+
"range": [16, 19],
|
|
14456
|
+
"fault": {
|
|
14457
|
+
"kind": "parameter_operator_error",
|
|
14458
|
+
"range": [16, 17]
|
|
14459
|
+
},
|
|
14460
|
+
"boundary": {
|
|
14461
|
+
"kind": "recovery_resume",
|
|
14462
|
+
"range": [19, 19]
|
|
14463
|
+
},
|
|
14464
|
+
"fragments": [[17, 19]]
|
|
14465
|
+
},
|
|
14466
|
+
{
|
|
14467
|
+
"owner": {
|
|
14468
|
+
"kind": "io_redirect",
|
|
14469
|
+
"start": 27,
|
|
14470
|
+
"end": 28
|
|
14471
|
+
},
|
|
14472
|
+
"range": [28, 28],
|
|
14473
|
+
"fault": {
|
|
14474
|
+
"kind": "redirection_target_gap",
|
|
14475
|
+
"range": [28, 28]
|
|
14476
|
+
},
|
|
14477
|
+
"boundary": {
|
|
14478
|
+
"kind": "recovery_resume",
|
|
14479
|
+
"range": [28, 28]
|
|
14480
|
+
},
|
|
14481
|
+
"fragments": []
|
|
14482
|
+
}
|
|
14483
|
+
]
|
|
14484
|
+
},
|
|
14485
|
+
{
|
|
14486
|
+
"name": "arithmetic quote source preserves an unfinished nested command substitution",
|
|
14487
|
+
"source": "echo $((\"1\"+$(echo",
|
|
14488
|
+
"expected": [
|
|
14489
|
+
{
|
|
14490
|
+
"owner": {
|
|
14491
|
+
"kind": "command_substitution",
|
|
14492
|
+
"start": 12,
|
|
14493
|
+
"end": 18
|
|
14494
|
+
},
|
|
14495
|
+
"range": [18, 18],
|
|
14496
|
+
"fault": {
|
|
14497
|
+
"kind": "substitution_ending_gap",
|
|
14498
|
+
"range": [18, 18]
|
|
14499
|
+
},
|
|
14500
|
+
"boundary": {
|
|
14501
|
+
"kind": "recovery_eof",
|
|
14502
|
+
"range": [18, 18]
|
|
14503
|
+
},
|
|
14504
|
+
"fragments": []
|
|
14505
|
+
}
|
|
14506
|
+
]
|
|
14507
|
+
},
|
|
14508
|
+
{
|
|
14509
|
+
"name": "command syntax with quotes still falls back from arithmetic",
|
|
14510
|
+
"source": "echo $((\"echo\" hi; :))\ncat >\n",
|
|
14511
|
+
"expected": [
|
|
14512
|
+
{
|
|
14513
|
+
"owner": {
|
|
14514
|
+
"kind": "io_redirect",
|
|
14515
|
+
"start": 27,
|
|
14516
|
+
"end": 28
|
|
14517
|
+
},
|
|
14518
|
+
"range": [28, 28],
|
|
14519
|
+
"fault": {
|
|
14520
|
+
"kind": "redirection_target_gap",
|
|
14521
|
+
"range": [28, 28]
|
|
14522
|
+
},
|
|
14523
|
+
"boundary": {
|
|
14524
|
+
"kind": "recovery_resume",
|
|
14525
|
+
"range": [28, 28]
|
|
14526
|
+
},
|
|
14527
|
+
"fragments": []
|
|
14528
|
+
}
|
|
14529
|
+
]
|
|
14530
|
+
},
|
|
14531
|
+
{
|
|
14532
|
+
"name": "arithmetic single quote delimiter preserves body faults and resumes",
|
|
14533
|
+
"source": "cat <<$((1+'2'))\n${x:bad}\n$((1+'2'))\ncat >\n",
|
|
14534
|
+
"expected": [
|
|
14535
|
+
{
|
|
14536
|
+
"owner": {
|
|
14537
|
+
"kind": "parameter_expansion",
|
|
14538
|
+
"start": 17,
|
|
14539
|
+
"end": 25
|
|
14540
|
+
},
|
|
14541
|
+
"range": [21, 24],
|
|
14542
|
+
"fault": {
|
|
14543
|
+
"kind": "parameter_operator_error",
|
|
14544
|
+
"range": [21, 22]
|
|
14545
|
+
},
|
|
14546
|
+
"boundary": {
|
|
14547
|
+
"kind": "recovery_resume",
|
|
14548
|
+
"range": [24, 24]
|
|
14549
|
+
},
|
|
14550
|
+
"fragments": [[22, 24]]
|
|
14551
|
+
},
|
|
14552
|
+
{
|
|
14553
|
+
"owner": {
|
|
14554
|
+
"kind": "io_redirect",
|
|
14555
|
+
"start": 41,
|
|
14556
|
+
"end": 42
|
|
14557
|
+
},
|
|
14558
|
+
"range": [42, 42],
|
|
14559
|
+
"fault": {
|
|
14560
|
+
"kind": "redirection_target_gap",
|
|
14561
|
+
"range": [42, 42]
|
|
14562
|
+
},
|
|
14563
|
+
"boundary": {
|
|
14564
|
+
"kind": "recovery_resume",
|
|
14565
|
+
"range": [42, 42]
|
|
14566
|
+
},
|
|
14567
|
+
"fragments": []
|
|
14568
|
+
}
|
|
14569
|
+
]
|
|
14570
|
+
},
|
|
14571
|
+
{
|
|
14572
|
+
"name": "arithmetic single quote delimiter with outer quotes suppresses body expansion and resumes",
|
|
14573
|
+
"source": "cat <<\"$((1+'2'))\"\n${x:bad}\n$((1+'2'))\ncat >\n",
|
|
14574
|
+
"expected": [
|
|
14575
|
+
{
|
|
14576
|
+
"owner": {
|
|
14577
|
+
"kind": "io_redirect",
|
|
14578
|
+
"start": 43,
|
|
14579
|
+
"end": 44
|
|
14580
|
+
},
|
|
14581
|
+
"range": [44, 44],
|
|
14582
|
+
"fault": {
|
|
14583
|
+
"kind": "redirection_target_gap",
|
|
14584
|
+
"range": [44, 44]
|
|
14585
|
+
},
|
|
14586
|
+
"boundary": {
|
|
14587
|
+
"kind": "recovery_resume",
|
|
14588
|
+
"range": [44, 44]
|
|
14589
|
+
},
|
|
14590
|
+
"fragments": []
|
|
14591
|
+
}
|
|
14592
|
+
]
|
|
14593
|
+
},
|
|
14594
|
+
{
|
|
14595
|
+
"name": "arithmetic double quote delimiter preserves body faults and resumes",
|
|
14596
|
+
"source": "cat <<$((1+\"2\"))\n${x:bad}\n$((1+\"2\"))\ncat >\n",
|
|
14597
|
+
"expected": [
|
|
14598
|
+
{
|
|
14599
|
+
"owner": {
|
|
14600
|
+
"kind": "parameter_expansion",
|
|
14601
|
+
"start": 17,
|
|
14602
|
+
"end": 25
|
|
14603
|
+
},
|
|
14604
|
+
"range": [21, 24],
|
|
14605
|
+
"fault": {
|
|
14606
|
+
"kind": "parameter_operator_error",
|
|
14607
|
+
"range": [21, 22]
|
|
14608
|
+
},
|
|
14609
|
+
"boundary": {
|
|
14610
|
+
"kind": "recovery_resume",
|
|
14611
|
+
"range": [24, 24]
|
|
14612
|
+
},
|
|
14613
|
+
"fragments": [[22, 24]]
|
|
14614
|
+
},
|
|
14615
|
+
{
|
|
14616
|
+
"owner": {
|
|
14617
|
+
"kind": "io_redirect",
|
|
14618
|
+
"start": 41,
|
|
14619
|
+
"end": 42
|
|
14620
|
+
},
|
|
14621
|
+
"range": [42, 42],
|
|
14622
|
+
"fault": {
|
|
14623
|
+
"kind": "redirection_target_gap",
|
|
14624
|
+
"range": [42, 42]
|
|
14625
|
+
},
|
|
14626
|
+
"boundary": {
|
|
14627
|
+
"kind": "recovery_resume",
|
|
14628
|
+
"range": [42, 42]
|
|
14629
|
+
},
|
|
14630
|
+
"fragments": []
|
|
14631
|
+
}
|
|
14632
|
+
]
|
|
14633
|
+
},
|
|
14634
|
+
{
|
|
14635
|
+
"name": "arithmetic double quote delimiter with outer quotes suppresses body expansion and resumes",
|
|
14636
|
+
"source": "cat <<\"$((1+\"2\"))\"\n${x:bad}\n$((1+\"2\"))\ncat >\n",
|
|
14637
|
+
"expected": [
|
|
14638
|
+
{
|
|
14639
|
+
"owner": {
|
|
14640
|
+
"kind": "io_redirect",
|
|
14641
|
+
"start": 43,
|
|
14642
|
+
"end": 44
|
|
14643
|
+
},
|
|
14644
|
+
"range": [44, 44],
|
|
14645
|
+
"fault": {
|
|
14646
|
+
"kind": "redirection_target_gap",
|
|
14647
|
+
"range": [44, 44]
|
|
14648
|
+
},
|
|
14649
|
+
"boundary": {
|
|
14650
|
+
"kind": "recovery_resume",
|
|
14651
|
+
"range": [44, 44]
|
|
14652
|
+
},
|
|
14653
|
+
"fragments": []
|
|
14654
|
+
}
|
|
14655
|
+
]
|
|
14047
14656
|
}
|
|
14048
14657
|
]
|