sh-ast 0.3.0 → 0.4.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/README.md +165 -133
- package/dist/analyze/ansi-c-escapes.d.ts +1 -1
- package/dist/analyze/ansi-c-escapes.js +1 -1
- package/dist/analyze/enumerate-commands.d.ts +11 -16
- package/dist/analyze/enumerate-commands.d.ts.map +1 -1
- package/dist/analyze/enumerate-commands.js +82 -92
- package/dist/analyze/enumerate-commands.js.map +1 -1
- package/dist/analyze/index.d.ts +3 -2
- package/dist/analyze/index.d.ts.map +1 -1
- package/dist/analyze/index.js +1 -1
- package/dist/analyze/node-helpers.d.ts +10 -21
- package/dist/analyze/node-helpers.d.ts.map +1 -1
- package/dist/analyze/node-helpers.js +16 -27
- package/dist/analyze/node-helpers.js.map +1 -1
- package/dist/analyze/resolve-argv0.d.ts +6 -6
- package/dist/analyze/resolve-argv0.js +6 -6
- package/dist/analyze/resolve-word.d.ts +7 -10
- package/dist/analyze/resolve-word.d.ts.map +1 -1
- package/dist/analyze/resolve-word.js +39 -22
- package/dist/analyze/resolve-word.js.map +1 -1
- package/dist/analyze.d.ts +3780 -397
- package/dist/errors.d.ts +6 -79
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +5 -64
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +16 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -4
- package/dist/index.js.map +1 -1
- package/dist/sh-ast.d.ts +3503 -1027
- package/dist/syntax-errors.d.ts +56 -0
- package/dist/syntax-errors.d.ts.map +1 -0
- package/dist/syntax-errors.js +80 -0
- package/dist/syntax-errors.js.map +1 -0
- package/dist/syntax-snapshot.d.ts +47 -0
- package/dist/syntax-snapshot.d.ts.map +1 -0
- package/dist/syntax-snapshot.js +121 -0
- package/dist/syntax-snapshot.js.map +1 -0
- package/dist/syntax-wire.d.ts +31 -0
- package/dist/syntax-wire.d.ts.map +1 -0
- package/dist/syntax-wire.js +202 -0
- package/dist/syntax-wire.js.map +1 -0
- package/dist/syntax.d.ts +65 -0
- package/dist/syntax.d.ts.map +1 -0
- package/dist/syntax.js +152 -0
- package/dist/syntax.js.map +1 -0
- package/dist/wasm-instance.d.ts +5 -8
- package/dist/wasm-instance.d.ts.map +1 -1
- package/dist/wasm-instance.js +44 -47
- package/dist/wasm-instance.js.map +1 -1
- package/generated/syntax-constants.d.ts +1652 -0
- package/generated/syntax-constants.js +1384 -0
- package/generated/syntax-schema.d.ts +60 -0
- package/generated/syntax-schema.js +1740 -0
- package/generated/syntax-types.d.ts +1977 -0
- package/package.json +2 -2
- package/shim/sh-ast.wasm +0 -0
- package/dist/normalize.d.ts +0 -52
- package/dist/normalize.d.ts.map +0 -1
- package/dist/normalize.js +0 -260
- package/dist/normalize.js.map +0 -1
- package/dist/parse.d.ts +0 -50
- package/dist/parse.d.ts.map +0 -1
- package/dist/parse.js +0 -125
- package/dist/parse.js.map +0 -1
- package/dist/types.d.ts +0 -74
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/visitor-keys.d.ts +0 -21
- package/dist/visitor-keys.d.ts.map +0 -1
- package/dist/visitor-keys.js +0 -23
- package/dist/visitor-keys.js.map +0 -1
- package/dist/walk.d.ts +0 -18
- package/dist/walk.d.ts.map +0 -1
- package/dist/walk.js +0 -40
- package/dist/walk.js.map +0 -1
- package/generated/child-type-schema.d.ts +0 -14
- package/generated/child-type-schema.js +0 -188
- package/generated/node-types.d.ts +0 -1002
- package/generated/position-fields.d.ts +0 -21
- package/generated/position-fields.js +0 -50
- package/generated/visitor-keys.d.ts +0 -11
- package/generated/visitor-keys.js +0 -50
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Code generated by tools/gen-visitor-keys from mvdan.cc/sh/v3 v3.13.1. DO NOT EDIT.
|
|
2
|
+
// Faithful syntax values; see design/ARCHITECTURE.md.
|
|
3
|
+
/*
|
|
4
|
+
Copyright (c) 2016, Daniel Martí. All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are
|
|
8
|
+
met:
|
|
9
|
+
|
|
10
|
+
* Redistributions of source code must retain the above copyright
|
|
11
|
+
notice, this list of conditions and the following disclaimer.
|
|
12
|
+
* Redistributions in binary form must reproduce the above
|
|
13
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
14
|
+
in the documentation and/or other materials provided with the
|
|
15
|
+
distribution.
|
|
16
|
+
* Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
21
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
22
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
23
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
24
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
25
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
26
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
27
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
28
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
29
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
30
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A field's upstream value kind and nil-bearing boundaries. Null type names
|
|
35
|
+
* identify scalar/position kinds; other names identify concrete Go types.
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export interface SyntaxFieldSchema {
|
|
39
|
+
/** The upstream value domain, independent of a field's current value. */
|
|
40
|
+
readonly kind: 'boolean' | 'string' | 'position' | 'operator' | 'struct' | 'interface';
|
|
41
|
+
/** Named operator, record, or interface domain; null for scalar/position data. */
|
|
42
|
+
readonly type: string | null;
|
|
43
|
+
/** Whether the entire field may hold the upstream nil value. */
|
|
44
|
+
readonly nullable: boolean;
|
|
45
|
+
/** Whether the field is an ordered Go slice, preserving nil versus empty. */
|
|
46
|
+
readonly slice: boolean;
|
|
47
|
+
/** Whether a slice element may independently hold a nil pointer/interface. */
|
|
48
|
+
readonly elementNullable: boolean;
|
|
49
|
+
}
|
|
50
|
+
/** Complete data fields and real syntax.Node membership. @public */
|
|
51
|
+
export interface SyntaxRecordSchema {
|
|
52
|
+
/** Whether the actual upstream type implements syntax.Node. */
|
|
53
|
+
readonly node: boolean;
|
|
54
|
+
/** Every exported upstream field, retaining its original spelling. */
|
|
55
|
+
readonly fields: Readonly<Record<string, SyntaxFieldSchema>>;
|
|
56
|
+
}
|
|
57
|
+
/** Reflection metadata; field order is not upstream Walk order. @public */
|
|
58
|
+
export declare const SYNTAX_SCHEMA: Readonly<Record<string, SyntaxRecordSchema>>;
|
|
59
|
+
/** Concrete alternatives accepted by upstream interfaces. @public */
|
|
60
|
+
export declare const SYNTAX_INTERFACES: Readonly<Record<string, readonly string[]>>;
|