aboutsummaryrefslogtreecommitdiff
path: root/node_modules/meriyah/dist/src/errors.d.ts
blob: 489b66414275ff8a51e5664d4da3faa68691acc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
import { ParserState } from './common';
export declare const enum Errors {
    Unexpected = 0,
    StrictOctalEscape = 1,
    TemplateOctalLiteral = 2,
    InvalidPrivateIdentifier = 3,
    InvalidUnicodeEscapeSequence = 4,
    InvalidCodePoint = 5,
    InvalidHexEscapeSequence = 6,
    StrictDecimalWithLeadingZero = 7,
    StrictOctalLiteral = 8,
    ExpectedNumberInRadix = 9,
    MissingExponent = 10,
    InvalidBigInt = 11,
    IDStartAfterNumber = 12,
    InvalidEightAndNine = 13,
    UnterminatedString = 14,
    UnterminatedTemplate = 15,
    UnterminatedComment = 16,
    InvalidDynamicUnicode = 17,
    IllegalCharacter = 18,
    MissingHexDigits = 19,
    InvalidImplicitOctals = 20,
    InvalidStringLT = 21,
    InvalidEscapeIdentifier = 22,
    ExpectedToken = 23,
    CantAssignTo = 24,
    InvalidLHSAsyncArrow = 25,
    SuperNoConstructor = 26,
    InvalidSuperProperty = 27,
    UnexpectedToken = 28,
    AwaitInParameter = 29,
    YieldInParameter = 30,
    InvalidExponentiationLHS = 31,
    UnterminatedRegExp = 32,
    UnexpectedTokenRegExpFlag = 33,
    DuplicateRegExpFlag = 34,
    AccessorWrongArgs = 35,
    BadSetterRestParameter = 36,
    DeclNoName = 37,
    StrictFunctionName = 38,
    RestMissingArg = 39,
    InvalidGeneratorGetter = 40,
    InvalidComputedPropName = 41,
    InvalidGetSetGenerator = 42,
    InvalidAsyncGetter = 43,
    InvalidGenMethodShorthand = 44,
    InvalidLineBreak = 45,
    InvalidArrowDestructLHS = 46,
    InvalidBindingDestruct = 47,
    InvalidAsyncArrow = 48,
    StaticPrototype = 49,
    InvalidConstructor = 50,
    DuplicateConstructor = 51,
    InvalidIncDecTarget = 52,
    InvalidIncDecNew = 53,
    InvalidAssignmentTarget = 54,
    InvalidRestTrailing = 55,
    DeclarationMissingInitializer = 56,
    ForInOfLoopInitializer = 57,
    ForInOfLoopMultiBindings = 58,
    InvalidShorthandPropInit = 59,
    DuplicateProto = 60,
    InvalidLetBoundName = 61,
    InvalidNewUnary = 62,
    IllegalUseStrict = 63,
    DisallowedLetInStrict = 64,
    IllegalContinue = 65,
    IllegalBreak = 66,
    InvalidLetBracket = 67,
    InvalidDestructuringTarget = 68,
    RestDefaultInitializer = 69,
    InvalidRestNotLast = 70,
    InvalidRestArg = 71,
    InvalidRestDefault = 72,
    StrictFunction = 73,
    SloppyFunction = 74,
    WebCompatFunction = 75,
    ClassForbiddenAsStatement = 76,
    CantAssignToInOfForLoop = 77,
    InvalidAssignmentInOfForLoop = 78,
    InvalidForAwait = 79,
    InvalidTemplateContinuation = 80,
    RestrictedLetProduction = 81,
    UnexpectedLetStrictReserved = 82,
    InvalidCatchParams = 83,
    InvalidCatchParamDefault = 84,
    NoCatchOrFinally = 85,
    MultipleDefaultsInSwitch = 86,
    NewlineAfterThrow = 87,
    StrictWith = 88,
    IllegalReturn = 89,
    InvalidForLHSBinding = 90,
    InvalidNewTarget = 91,
    InvalidEscapedKeyword = 92,
    MissingPrivateIdentifier = 93,
    DisallowedInContext = 94,
    AwaitOutsideAsync = 95,
    InvalidStrictLet = 96,
    InvalidLetConstBinding = 97,
    InvalidLetClassName = 98,
    KeywordNotId = 99,
    InvalidImportExportSloppy = 100,
    UnicodeOverflow = 101,
    InvalidExportImportSource = 102,
    InvalidKeywordAsAlias = 103,
    InvalidDefaultImport = 104,
    TrailingDecorators = 105,
    GeneratorConstructor = 106,
    AwaitOrYieldIdentInModule = 107,
    HtmlCommentInWebCompat = 108,
    StrictInvalidLetInExprPos = 109,
    NotAssignableLetArgs = 110,
    ForOfLet = 111,
    InvalidInvokedBlockBodyArrow = 112,
    InvalidAccessedBlockBodyArrow = 113,
    UnexpectedStrictReserved = 114,
    StrictEvalArguments = 115,
    InvalidDecoratorSemicolon = 116,
    StrictDelete = 117,
    InvalidPatternTail = 118,
    AsyncFunctionInSingleStatementContext = 119,
    InvalidTernaryYield = 120,
    InvalidArrowPostfix = 121,
    InvalidObjLitKeyStar = 122,
    DeletePrivateField = 123,
    InvalidStaticClassFieldConstructor = 124,
    InvalidClassFieldConstructor = 125,
    InvalidClassFieldArgEval = 126,
    InvalidGeneratorFunction = 127,
    AsyncRestrictedProd = 128,
    UnexpectedCharAfterObjLit = 129,
    InvalidObjLitKey = 130,
    InvalidKeyToken = 131,
    LabelRedeclaration = 132,
    InvalidNestedStatement = 133,
    UnknownLabel = 134,
    InvalidImportTail = 135,
    ImportNotOneArg = 136,
    InvalidImportNew = 137,
    InvalidSpreadInImport = 138,
    UncompleteArrow = 139,
    DuplicateBinding = 140,
    DuplicateExportBinding = 141,
    UndeclaredExportedBinding = 142,
    UnexpectedPrivateField = 143,
    DuplicateLetConstBinding = 144,
    CantAssignToValidRHS = 145,
    ContinuousNumericSeparator = 146,
    TrailingNumericSeparator = 147,
    InvalidJSXAttributeValue = 148,
    ExpectedJSXClosingTag = 149,
    AdjacentJSXElements = 150,
    InvalidNonEmptyJSXExpr = 151,
    DuplicateIdentifier = 152,
    ShadowedCatchClause = 153,
    InvalidDotProperty = 154,
    UnclosedSpreadElement = 155,
    CatchWithoutTry = 156,
    FinallyWithoutTry = 157,
    UnCorrespondingFragmentTag = 158,
    InvalidCoalescing = 159,
    OptionalChainingNoTemplate = 160,
    OptionalChainingNoSuper = 161,
    OptionalChainingNoNew = 162,
    ImportMetaOutsideModule = 163,
    InvalidLeadingDecorator = 164
}
export declare const errorMessages: {
    [key: string]: string;
};
export declare class ParseError extends SyntaxError {
    loc: {
        line: ParseError['line'];
        column: ParseError['column'];
    };
    index: number;
    line: number;
    column: number;
    description: string;
    constructor(startindex: number, line: number, column: number, type: Errors, ...params: string[]);
}
export declare function report(parser: ParserState, type: Errors, ...params: string[]): never;
export declare function reportScopeError(scope: any): never;
export declare function reportMessageAt(index: number, line: number, column: number, type: Errors, ...params: string[]): never;
export declare function reportScannerError(index: number, line: number, column: number, type: Errors): never;
//# sourceMappingURL=errors.d.ts.map