@mirascript/constants 0.1.44 → 0.1.46
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/dist/constants.g.d.ts +154 -145
- package/dist/constants.g.d.ts.map +1 -1
- package/dist/constants.g.js +251 -240
- package/dist/constants.g.js.map +1 -1
- package/package.json +2 -2
- package/src/constants.g.ts +251 -240
package/dist/constants.g.js
CHANGED
|
@@ -39,41 +39,43 @@ export var DiagnosticCode;
|
|
|
39
39
|
DiagnosticCode[DiagnosticCode["MissingBindOperator"] = 1033] = "MissingBindOperator";
|
|
40
40
|
DiagnosticCode[DiagnosticCode["InvalidConstantName"] = 1034] = "InvalidConstantName";
|
|
41
41
|
DiagnosticCode[DiagnosticCode["MissingFunctionName"] = 1035] = "MissingFunctionName";
|
|
42
|
-
DiagnosticCode[DiagnosticCode["
|
|
43
|
-
DiagnosticCode[DiagnosticCode["
|
|
44
|
-
DiagnosticCode[DiagnosticCode["
|
|
45
|
-
DiagnosticCode[DiagnosticCode["
|
|
46
|
-
DiagnosticCode[DiagnosticCode["
|
|
47
|
-
DiagnosticCode[DiagnosticCode["
|
|
48
|
-
DiagnosticCode[DiagnosticCode["
|
|
49
|
-
DiagnosticCode[DiagnosticCode["
|
|
50
|
-
DiagnosticCode[DiagnosticCode["
|
|
51
|
-
DiagnosticCode[DiagnosticCode["
|
|
52
|
-
DiagnosticCode[DiagnosticCode["
|
|
53
|
-
DiagnosticCode[DiagnosticCode["
|
|
54
|
-
DiagnosticCode[DiagnosticCode["
|
|
55
|
-
DiagnosticCode[DiagnosticCode["
|
|
56
|
-
DiagnosticCode[DiagnosticCode["
|
|
57
|
-
DiagnosticCode[DiagnosticCode["
|
|
58
|
-
DiagnosticCode[DiagnosticCode["
|
|
59
|
-
DiagnosticCode[DiagnosticCode["
|
|
60
|
-
DiagnosticCode[DiagnosticCode["
|
|
61
|
-
DiagnosticCode[DiagnosticCode["
|
|
62
|
-
DiagnosticCode[DiagnosticCode["
|
|
63
|
-
DiagnosticCode[DiagnosticCode["
|
|
64
|
-
DiagnosticCode[DiagnosticCode["
|
|
65
|
-
DiagnosticCode[DiagnosticCode["
|
|
66
|
-
DiagnosticCode[DiagnosticCode["
|
|
67
|
-
DiagnosticCode[DiagnosticCode["
|
|
68
|
-
DiagnosticCode[DiagnosticCode["
|
|
69
|
-
DiagnosticCode[DiagnosticCode["
|
|
70
|
-
DiagnosticCode[DiagnosticCode["
|
|
71
|
-
DiagnosticCode[DiagnosticCode["
|
|
72
|
-
DiagnosticCode[DiagnosticCode["
|
|
73
|
-
DiagnosticCode[DiagnosticCode["
|
|
74
|
-
DiagnosticCode[DiagnosticCode["
|
|
75
|
-
DiagnosticCode[DiagnosticCode["
|
|
76
|
-
DiagnosticCode[DiagnosticCode["
|
|
42
|
+
DiagnosticCode[DiagnosticCode["MissingModuleName"] = 1036] = "MissingModuleName";
|
|
43
|
+
DiagnosticCode[DiagnosticCode["MissingOpenParenAfterExtension"] = 1037] = "MissingOpenParenAfterExtension";
|
|
44
|
+
DiagnosticCode[DiagnosticCode["MissingOpenParenAfterType"] = 1038] = "MissingOpenParenAfterType";
|
|
45
|
+
DiagnosticCode[DiagnosticCode["InvalidTypeCall"] = 1039] = "InvalidTypeCall";
|
|
46
|
+
DiagnosticCode[DiagnosticCode["RecordLiteralInExtensionCaller"] = 1040] = "RecordLiteralInExtensionCaller";
|
|
47
|
+
DiagnosticCode[DiagnosticCode["MissingCase"] = 1041] = "MissingCase";
|
|
48
|
+
DiagnosticCode[DiagnosticCode["UnknownExpression"] = 1042] = "UnknownExpression";
|
|
49
|
+
DiagnosticCode[DiagnosticCode["UnmatchedCloseBrace"] = 1043] = "UnmatchedCloseBrace";
|
|
50
|
+
DiagnosticCode[DiagnosticCode["UnmatchedCloseBracket"] = 1044] = "UnmatchedCloseBracket";
|
|
51
|
+
DiagnosticCode[DiagnosticCode["UnmatchedCloseParen"] = 1045] = "UnmatchedCloseParen";
|
|
52
|
+
DiagnosticCode[DiagnosticCode["UnknownPattern"] = 1046] = "UnknownPattern";
|
|
53
|
+
DiagnosticCode[DiagnosticCode["InvalidConstantLiteral"] = 1047] = "InvalidConstantLiteral";
|
|
54
|
+
DiagnosticCode[DiagnosticCode["UnknownStatement"] = 1048] = "UnknownStatement";
|
|
55
|
+
DiagnosticCode[DiagnosticCode["ExpressionExpected"] = 1049] = "ExpressionExpected";
|
|
56
|
+
DiagnosticCode[DiagnosticCode["PatternExpected"] = 1050] = "PatternExpected";
|
|
57
|
+
DiagnosticCode[DiagnosticCode["ExclamationInLiteralPattern"] = 1051] = "ExclamationInLiteralPattern";
|
|
58
|
+
DiagnosticCode[DiagnosticCode["MutInRebindPattern"] = 1052] = "MutInRebindPattern";
|
|
59
|
+
DiagnosticCode[DiagnosticCode["ConstantInBindPattern"] = 1053] = "ConstantInBindPattern";
|
|
60
|
+
DiagnosticCode[DiagnosticCode["MutInDiscardPattern"] = 1054] = "MutInDiscardPattern";
|
|
61
|
+
DiagnosticCode[DiagnosticCode["DiscardInSpreadPattern"] = 1055] = "DiscardInSpreadPattern";
|
|
62
|
+
DiagnosticCode[DiagnosticCode["SpreadDiscardInRecordPattern"] = 1056] = "SpreadDiscardInRecordPattern";
|
|
63
|
+
DiagnosticCode[DiagnosticCode["MispositionedSpreadInRecordPattern"] = 1057] = "MispositionedSpreadInRecordPattern";
|
|
64
|
+
DiagnosticCode[DiagnosticCode["InterpolatedNameRecordPattern"] = 1058] = "InterpolatedNameRecordPattern";
|
|
65
|
+
DiagnosticCode[DiagnosticCode["BadOmitKeyRecordPattern"] = 1059] = "BadOmitKeyRecordPattern";
|
|
66
|
+
DiagnosticCode[DiagnosticCode["AmbiguousRangePattern"] = 1060] = "AmbiguousRangePattern";
|
|
67
|
+
DiagnosticCode[DiagnosticCode["DuplicateSpreadPattern"] = 1061] = "DuplicateSpreadPattern";
|
|
68
|
+
DiagnosticCode[DiagnosticCode["MispositionedRestParameter"] = 1062] = "MispositionedRestParameter";
|
|
69
|
+
DiagnosticCode[DiagnosticCode["UndefinedVariableAssignment"] = 1063] = "UndefinedVariableAssignment";
|
|
70
|
+
DiagnosticCode[DiagnosticCode["ImmutableVariableAssignment"] = 1064] = "ImmutableVariableAssignment";
|
|
71
|
+
DiagnosticCode[DiagnosticCode["UninitializedVariable"] = 1065] = "UninitializedVariable";
|
|
72
|
+
DiagnosticCode[DiagnosticCode["DuplicateVariableDeclaration"] = 1066] = "DuplicateVariableDeclaration";
|
|
73
|
+
DiagnosticCode[DiagnosticCode["UnexpectedBreak"] = 1067] = "UnexpectedBreak";
|
|
74
|
+
DiagnosticCode[DiagnosticCode["UnexpectedContinue"] = 1068] = "UnexpectedContinue";
|
|
75
|
+
DiagnosticCode[DiagnosticCode["MisuseOfGlobalKeyword"] = 1069] = "MisuseOfGlobalKeyword";
|
|
76
|
+
DiagnosticCode[DiagnosticCode["BadOmitKeyRecordExpression"] = 1070] = "BadOmitKeyRecordExpression";
|
|
77
|
+
DiagnosticCode[DiagnosticCode["UnassignableExpression"] = 1071] = "UnassignableExpression";
|
|
78
|
+
DiagnosticCode[DiagnosticCode["UnexpectedPub"] = 1072] = "UnexpectedPub";
|
|
77
79
|
DiagnosticCode[DiagnosticCode["ErrorEnd"] = 1999] = "ErrorEnd";
|
|
78
80
|
DiagnosticCode[DiagnosticCode["WarningStart"] = 2000] = "WarningStart";
|
|
79
81
|
DiagnosticCode[DiagnosticCode["MisleadingNilVariable"] = 2001] = "MisleadingNilVariable";
|
|
@@ -113,72 +115,74 @@ export var DiagnosticCode;
|
|
|
113
115
|
DiagnosticCode[DiagnosticCode["LocalImmutable"] = 10002] = "LocalImmutable";
|
|
114
116
|
DiagnosticCode[DiagnosticCode["LocalMutable"] = 10003] = "LocalMutable";
|
|
115
117
|
DiagnosticCode[DiagnosticCode["LocalFunction"] = 10004] = "LocalFunction";
|
|
116
|
-
DiagnosticCode[DiagnosticCode["
|
|
117
|
-
DiagnosticCode[DiagnosticCode["
|
|
118
|
-
DiagnosticCode[DiagnosticCode["
|
|
119
|
-
DiagnosticCode[DiagnosticCode["
|
|
120
|
-
DiagnosticCode[DiagnosticCode["
|
|
121
|
-
DiagnosticCode[DiagnosticCode["
|
|
122
|
-
DiagnosticCode[DiagnosticCode["
|
|
123
|
-
DiagnosticCode[DiagnosticCode["
|
|
124
|
-
DiagnosticCode[DiagnosticCode["
|
|
125
|
-
DiagnosticCode[DiagnosticCode["
|
|
126
|
-
DiagnosticCode[DiagnosticCode["
|
|
127
|
-
DiagnosticCode[DiagnosticCode["
|
|
128
|
-
DiagnosticCode[DiagnosticCode["
|
|
129
|
-
DiagnosticCode[DiagnosticCode["
|
|
130
|
-
DiagnosticCode[DiagnosticCode["
|
|
131
|
-
DiagnosticCode[DiagnosticCode["
|
|
132
|
-
DiagnosticCode[DiagnosticCode["
|
|
133
|
-
DiagnosticCode[DiagnosticCode["
|
|
134
|
-
DiagnosticCode[DiagnosticCode["
|
|
135
|
-
DiagnosticCode[DiagnosticCode["
|
|
136
|
-
DiagnosticCode[DiagnosticCode["
|
|
137
|
-
DiagnosticCode[DiagnosticCode["
|
|
138
|
-
DiagnosticCode[DiagnosticCode["
|
|
139
|
-
DiagnosticCode[DiagnosticCode["
|
|
140
|
-
DiagnosticCode[DiagnosticCode["
|
|
141
|
-
DiagnosticCode[DiagnosticCode["
|
|
142
|
-
DiagnosticCode[DiagnosticCode["
|
|
143
|
-
DiagnosticCode[DiagnosticCode["
|
|
144
|
-
DiagnosticCode[DiagnosticCode["
|
|
145
|
-
DiagnosticCode[DiagnosticCode["
|
|
146
|
-
DiagnosticCode[DiagnosticCode["
|
|
147
|
-
DiagnosticCode[DiagnosticCode["
|
|
148
|
-
DiagnosticCode[DiagnosticCode["
|
|
149
|
-
DiagnosticCode[DiagnosticCode["
|
|
150
|
-
DiagnosticCode[DiagnosticCode["
|
|
151
|
-
DiagnosticCode[DiagnosticCode["
|
|
152
|
-
DiagnosticCode[DiagnosticCode["
|
|
153
|
-
DiagnosticCode[DiagnosticCode["
|
|
118
|
+
DiagnosticCode[DiagnosticCode["LocalModule"] = 10005] = "LocalModule";
|
|
119
|
+
DiagnosticCode[DiagnosticCode["ParameterIt"] = 10006] = "ParameterIt";
|
|
120
|
+
DiagnosticCode[DiagnosticCode["ParameterImmutable"] = 10007] = "ParameterImmutable";
|
|
121
|
+
DiagnosticCode[DiagnosticCode["ParameterMutable"] = 10008] = "ParameterMutable";
|
|
122
|
+
DiagnosticCode[DiagnosticCode["ParameterImmutableRest"] = 10009] = "ParameterImmutableRest";
|
|
123
|
+
DiagnosticCode[DiagnosticCode["ParameterMutableRest"] = 10010] = "ParameterMutableRest";
|
|
124
|
+
DiagnosticCode[DiagnosticCode["ParameterPattern"] = 10011] = "ParameterPattern";
|
|
125
|
+
DiagnosticCode[DiagnosticCode["ParameterRestPattern"] = 10012] = "ParameterRestPattern";
|
|
126
|
+
DiagnosticCode[DiagnosticCode["ParameterSubPatternImmutable"] = 10013] = "ParameterSubPatternImmutable";
|
|
127
|
+
DiagnosticCode[DiagnosticCode["ParameterSubPatternMutable"] = 10014] = "ParameterSubPatternMutable";
|
|
128
|
+
DiagnosticCode[DiagnosticCode["GlobalVariable"] = 10015] = "GlobalVariable";
|
|
129
|
+
DiagnosticCode[DiagnosticCode["GlobalDynamicAccess"] = 10016] = "GlobalDynamicAccess";
|
|
130
|
+
DiagnosticCode[DiagnosticCode["RecordFieldIdName"] = 10017] = "RecordFieldIdName";
|
|
131
|
+
DiagnosticCode[DiagnosticCode["RecordFieldOrdinalName"] = 10018] = "RecordFieldOrdinalName";
|
|
132
|
+
DiagnosticCode[DiagnosticCode["RecordFieldStringName"] = 10019] = "RecordFieldStringName";
|
|
133
|
+
DiagnosticCode[DiagnosticCode["UnnamedRecordField0"] = 10020] = "UnnamedRecordField0";
|
|
134
|
+
DiagnosticCode[DiagnosticCode["UnnamedRecordField1"] = 10021] = "UnnamedRecordField1";
|
|
135
|
+
DiagnosticCode[DiagnosticCode["UnnamedRecordField2"] = 10022] = "UnnamedRecordField2";
|
|
136
|
+
DiagnosticCode[DiagnosticCode["UnnamedRecordField3"] = 10023] = "UnnamedRecordField3";
|
|
137
|
+
DiagnosticCode[DiagnosticCode["UnnamedRecordField4"] = 10024] = "UnnamedRecordField4";
|
|
138
|
+
DiagnosticCode[DiagnosticCode["UnnamedRecordField5"] = 10025] = "UnnamedRecordField5";
|
|
139
|
+
DiagnosticCode[DiagnosticCode["UnnamedRecordField6"] = 10026] = "UnnamedRecordField6";
|
|
140
|
+
DiagnosticCode[DiagnosticCode["UnnamedRecordField7"] = 10027] = "UnnamedRecordField7";
|
|
141
|
+
DiagnosticCode[DiagnosticCode["UnnamedRecordField8"] = 10028] = "UnnamedRecordField8";
|
|
142
|
+
DiagnosticCode[DiagnosticCode["UnnamedRecordField9"] = 10029] = "UnnamedRecordField9";
|
|
143
|
+
DiagnosticCode[DiagnosticCode["UnnamedRecordFieldN"] = 10030] = "UnnamedRecordFieldN";
|
|
144
|
+
DiagnosticCode[DiagnosticCode["OmitNamedRecordField"] = 10031] = "OmitNamedRecordField";
|
|
145
|
+
DiagnosticCode[DiagnosticCode["FunctionCall"] = 10032] = "FunctionCall";
|
|
146
|
+
DiagnosticCode[DiagnosticCode["ExtensionCall"] = 10033] = "ExtensionCall";
|
|
147
|
+
DiagnosticCode[DiagnosticCode["Scope"] = 10034] = "Scope";
|
|
148
|
+
DiagnosticCode[DiagnosticCode["String"] = 10035] = "String";
|
|
149
|
+
DiagnosticCode[DiagnosticCode["Interpolation"] = 10036] = "Interpolation";
|
|
150
|
+
DiagnosticCode[DiagnosticCode["ForExpression"] = 10037] = "ForExpression";
|
|
151
|
+
DiagnosticCode[DiagnosticCode["WhileExpression"] = 10038] = "WhileExpression";
|
|
152
|
+
DiagnosticCode[DiagnosticCode["LoopExpression"] = 10039] = "LoopExpression";
|
|
153
|
+
DiagnosticCode[DiagnosticCode["FnDeclaration"] = 10040] = "FnDeclaration";
|
|
154
|
+
DiagnosticCode[DiagnosticCode["FnExpression"] = 10041] = "FnExpression";
|
|
155
|
+
DiagnosticCode[DiagnosticCode["IfExpression"] = 10042] = "IfExpression";
|
|
156
|
+
DiagnosticCode[DiagnosticCode["MatchExpression"] = 10043] = "MatchExpression";
|
|
154
157
|
DiagnosticCode[DiagnosticCode["TagEnd"] = 10999] = "TagEnd";
|
|
155
158
|
DiagnosticCode[DiagnosticCode["TagRefStart"] = 11000] = "TagRefStart";
|
|
156
159
|
DiagnosticCode[DiagnosticCode["ReadLocal"] = 11001] = "ReadLocal";
|
|
157
160
|
DiagnosticCode[DiagnosticCode["ReadWriteLocal"] = 11002] = "ReadWriteLocal";
|
|
158
161
|
DiagnosticCode[DiagnosticCode["WriteLocal"] = 11003] = "WriteLocal";
|
|
159
162
|
DiagnosticCode[DiagnosticCode["RedeclareLocal"] = 11004] = "RedeclareLocal";
|
|
160
|
-
DiagnosticCode[DiagnosticCode["
|
|
161
|
-
DiagnosticCode[DiagnosticCode["
|
|
162
|
-
DiagnosticCode[DiagnosticCode["
|
|
163
|
-
DiagnosticCode[DiagnosticCode["
|
|
164
|
-
DiagnosticCode[DiagnosticCode["
|
|
165
|
-
DiagnosticCode[DiagnosticCode["
|
|
166
|
-
DiagnosticCode[DiagnosticCode["
|
|
167
|
-
DiagnosticCode[DiagnosticCode["
|
|
168
|
-
DiagnosticCode[DiagnosticCode["
|
|
169
|
-
DiagnosticCode[DiagnosticCode["
|
|
170
|
-
DiagnosticCode[DiagnosticCode["
|
|
171
|
-
DiagnosticCode[DiagnosticCode["
|
|
172
|
-
DiagnosticCode[DiagnosticCode["
|
|
173
|
-
DiagnosticCode[DiagnosticCode["
|
|
174
|
-
DiagnosticCode[DiagnosticCode["
|
|
175
|
-
DiagnosticCode[DiagnosticCode["
|
|
176
|
-
DiagnosticCode[DiagnosticCode["
|
|
177
|
-
DiagnosticCode[DiagnosticCode["
|
|
163
|
+
DiagnosticCode[DiagnosticCode["ExportedLocal"] = 11005] = "ExportedLocal";
|
|
164
|
+
DiagnosticCode[DiagnosticCode["Callable"] = 11006] = "Callable";
|
|
165
|
+
DiagnosticCode[DiagnosticCode["ArgumentExtension"] = 11007] = "ArgumentExtension";
|
|
166
|
+
DiagnosticCode[DiagnosticCode["ArgumentStart"] = 11008] = "ArgumentStart";
|
|
167
|
+
DiagnosticCode[DiagnosticCode["ArgumentEnd"] = 11009] = "ArgumentEnd";
|
|
168
|
+
DiagnosticCode[DiagnosticCode["ArgumentComma"] = 11010] = "ArgumentComma";
|
|
169
|
+
DiagnosticCode[DiagnosticCode["ArgumentSpread"] = 11011] = "ArgumentSpread";
|
|
170
|
+
DiagnosticCode[DiagnosticCode["KeywordFor"] = 11012] = "KeywordFor";
|
|
171
|
+
DiagnosticCode[DiagnosticCode["KeywordIn"] = 11013] = "KeywordIn";
|
|
172
|
+
DiagnosticCode[DiagnosticCode["KeywordWhile"] = 11014] = "KeywordWhile";
|
|
173
|
+
DiagnosticCode[DiagnosticCode["KeywordLoop"] = 11015] = "KeywordLoop";
|
|
174
|
+
DiagnosticCode[DiagnosticCode["KeywordBreak"] = 11016] = "KeywordBreak";
|
|
175
|
+
DiagnosticCode[DiagnosticCode["KeywordContinue"] = 11017] = "KeywordContinue";
|
|
176
|
+
DiagnosticCode[DiagnosticCode["KeywordIf"] = 11018] = "KeywordIf";
|
|
177
|
+
DiagnosticCode[DiagnosticCode["KeywordElse"] = 11019] = "KeywordElse";
|
|
178
|
+
DiagnosticCode[DiagnosticCode["KeywordMatch"] = 11020] = "KeywordMatch";
|
|
179
|
+
DiagnosticCode[DiagnosticCode["KeywordCase"] = 11021] = "KeywordCase";
|
|
180
|
+
DiagnosticCode[DiagnosticCode["KeywordFn"] = 11022] = "KeywordFn";
|
|
181
|
+
DiagnosticCode[DiagnosticCode["KeywordReturn"] = 11023] = "KeywordReturn";
|
|
178
182
|
/**
|
|
179
183
|
* Work with [DiagnosticCode::OmitNamedRecordField]
|
|
180
184
|
*/
|
|
181
|
-
DiagnosticCode[DiagnosticCode["OmitNamedRecordFieldName"] =
|
|
185
|
+
DiagnosticCode[DiagnosticCode["OmitNamedRecordFieldName"] = 11024] = "OmitNamedRecordFieldName";
|
|
182
186
|
DiagnosticCode[DiagnosticCode["TagRefEnd"] = 11999] = "TagRefEnd";
|
|
183
187
|
DiagnosticCode[DiagnosticCode["SourceMap"] = 12000] = "SourceMap";
|
|
184
188
|
})(DiagnosticCode || (DiagnosticCode = {}));
|
|
@@ -453,369 +457,376 @@ export var OpCode;
|
|
|
453
457
|
* %ret = (
|
|
454
458
|
*/
|
|
455
459
|
OpCode[OpCode["Record"] = 46] = "Record";
|
|
460
|
+
/**
|
|
461
|
+
* MODULE %ret `name`\
|
|
462
|
+
* %ret = mod CONSTANTS\[name] {
|
|
463
|
+
*/
|
|
464
|
+
OpCode[OpCode["Module"] = 47] = "Module";
|
|
456
465
|
/**
|
|
457
466
|
* FIELD `name` %field\
|
|
458
467
|
* \[CONSTANTS\[name]]: %field,
|
|
459
468
|
*/
|
|
460
|
-
OpCode[OpCode["Field"] =
|
|
469
|
+
OpCode[OpCode["Field"] = 48] = "Field";
|
|
461
470
|
/**
|
|
462
471
|
* FIELD_DYN %name %field\
|
|
463
472
|
* \[%name]: %field,
|
|
464
473
|
*/
|
|
465
|
-
OpCode[OpCode["FieldDyn"] =
|
|
474
|
+
OpCode[OpCode["FieldDyn"] = 49] = "FieldDyn";
|
|
466
475
|
/**
|
|
467
476
|
* FIELD_INDEX `index` %field\
|
|
468
477
|
* \[index]: %field,
|
|
469
478
|
*/
|
|
470
|
-
OpCode[OpCode["FieldIndex"] =
|
|
479
|
+
OpCode[OpCode["FieldIndex"] = 50] = "FieldIndex";
|
|
471
480
|
/**
|
|
472
481
|
* FIELD_OPT `name` %field\
|
|
473
482
|
* \[CONSTANTS\[name]]?: %field,
|
|
474
483
|
*/
|
|
475
|
-
OpCode[OpCode["FieldOpt"] =
|
|
484
|
+
OpCode[OpCode["FieldOpt"] = 51] = "FieldOpt";
|
|
476
485
|
/**
|
|
477
486
|
* FIELD_OPT_DYN %name %field\
|
|
478
487
|
* \[%name]?: %field,
|
|
479
488
|
*/
|
|
480
|
-
OpCode[OpCode["FieldOptDyn"] =
|
|
489
|
+
OpCode[OpCode["FieldOptDyn"] = 52] = "FieldOptDyn";
|
|
481
490
|
/**
|
|
482
491
|
* FIELD_OPT_INDEX `index` %field\
|
|
483
492
|
* \[index]?: %field,
|
|
484
493
|
*/
|
|
485
|
-
OpCode[OpCode["FieldOptIndex"] =
|
|
494
|
+
OpCode[OpCode["FieldOptIndex"] = 53] = "FieldOptIndex";
|
|
486
495
|
/**
|
|
487
496
|
* PICK %ret %var `n` `key_1` `key_2` ... `key_n`\
|
|
488
497
|
* %ret = %var pick keys CONSTANTS\[key_1], CONSTANTS\[key_2], ..., CONSTANTS\[key_n]
|
|
489
498
|
*/
|
|
490
|
-
OpCode[OpCode["Pick"] =
|
|
499
|
+
OpCode[OpCode["Pick"] = 54] = "Pick";
|
|
491
500
|
/**
|
|
492
501
|
* OMIT %ret %var `n` `key_1` `key_2` ... `key_n`\
|
|
493
502
|
* %ret = %var omit keys CONSTANTS\[key_1], CONSTANTS\[key_2], ..., CONSTANTS\[key_n]
|
|
494
503
|
*/
|
|
495
|
-
OpCode[OpCode["Omit"] =
|
|
504
|
+
OpCode[OpCode["Omit"] = 55] = "Omit";
|
|
496
505
|
/**
|
|
497
506
|
* ARRAY %ret\
|
|
498
507
|
* %ret = \[
|
|
499
508
|
*/
|
|
500
|
-
OpCode[OpCode["Array"] =
|
|
509
|
+
OpCode[OpCode["Array"] = 56] = "Array";
|
|
501
510
|
/**
|
|
502
511
|
* ITEM %item\
|
|
503
512
|
* %item,
|
|
504
513
|
*/
|
|
505
|
-
OpCode[OpCode["Item"] =
|
|
514
|
+
OpCode[OpCode["Item"] = 57] = "Item";
|
|
506
515
|
/**
|
|
507
516
|
* ITEM_RANGE `start` `end`\
|
|
508
517
|
* `start`..`end`,
|
|
509
518
|
*/
|
|
510
|
-
OpCode[OpCode["ItemRange"] =
|
|
519
|
+
OpCode[OpCode["ItemRange"] = 58] = "ItemRange";
|
|
511
520
|
/**
|
|
512
521
|
* ITEM_RANGE_DYN %start %end\
|
|
513
522
|
* %start..%end,
|
|
514
523
|
*/
|
|
515
|
-
OpCode[OpCode["ItemRangeDyn"] =
|
|
524
|
+
OpCode[OpCode["ItemRangeDyn"] = 59] = "ItemRangeDyn";
|
|
516
525
|
/**
|
|
517
526
|
* ITEM_RANGE_EXCLUSIVE_DYN %start %end\
|
|
518
527
|
* %start..<%end,
|
|
519
528
|
*/
|
|
520
|
-
OpCode[OpCode["ItemRangeExclusiveDyn"] =
|
|
529
|
+
OpCode[OpCode["ItemRangeExclusiveDyn"] = 60] = "ItemRangeExclusiveDyn";
|
|
521
530
|
/**
|
|
522
531
|
* SPREAD %var\
|
|
523
532
|
* ..%var,
|
|
524
533
|
*/
|
|
525
|
-
OpCode[OpCode["Spread"] =
|
|
534
|
+
OpCode[OpCode["Spread"] = 61] = "Spread";
|
|
526
535
|
/**
|
|
527
536
|
* FREEZE\
|
|
528
537
|
* ) for record or ] for array
|
|
529
538
|
*/
|
|
530
|
-
OpCode[OpCode["Freeze"] =
|
|
539
|
+
OpCode[OpCode["Freeze"] = 62] = "Freeze";
|
|
531
540
|
/**
|
|
532
541
|
* HAS %ret %var `key`\
|
|
533
542
|
* %ret = initialized(%var\[CONSTANTS\[key]])
|
|
534
543
|
*/
|
|
535
|
-
OpCode[OpCode["Has"] =
|
|
544
|
+
OpCode[OpCode["Has"] = 63] = "Has";
|
|
536
545
|
/**
|
|
537
546
|
* HAS_DYN %ret %var %key\
|
|
538
547
|
* %ret = initialized(%var\[%key])
|
|
539
548
|
*/
|
|
540
|
-
OpCode[OpCode["HasDyn"] =
|
|
549
|
+
OpCode[OpCode["HasDyn"] = 64] = "HasDyn";
|
|
541
550
|
/**
|
|
542
551
|
* HAS_INDEX %ret %var `index`\
|
|
543
552
|
* %ret = initialized(%var\[index])
|
|
544
553
|
*/
|
|
545
|
-
OpCode[OpCode["HasIndex"] =
|
|
554
|
+
OpCode[OpCode["HasIndex"] = 65] = "HasIndex";
|
|
546
555
|
/**
|
|
547
556
|
* GET %ret %var `key`\
|
|
548
557
|
* %ret = %var\[CONSTANTS\[key]] ?? nil
|
|
549
558
|
*/
|
|
550
|
-
OpCode[OpCode["Get"] =
|
|
559
|
+
OpCode[OpCode["Get"] = 66] = "Get";
|
|
551
560
|
/**
|
|
552
561
|
* GET_DYN %ret %var %key\
|
|
553
562
|
* %ret = %var\[%key] ?? nil
|
|
554
563
|
*/
|
|
555
|
-
OpCode[OpCode["GetDyn"] =
|
|
564
|
+
OpCode[OpCode["GetDyn"] = 67] = "GetDyn";
|
|
556
565
|
/**
|
|
557
566
|
* GET_INDEX %ret %var `index`\
|
|
558
567
|
* %ret = %var\[index] ?? nil
|
|
559
568
|
*/
|
|
560
|
-
OpCode[OpCode["GetIndex"] =
|
|
569
|
+
OpCode[OpCode["GetIndex"] = 68] = "GetIndex";
|
|
561
570
|
/**
|
|
562
571
|
* SET %value %var `key`\
|
|
563
572
|
* %var\[CONSTANTS\[key]] = %value
|
|
564
573
|
*/
|
|
565
|
-
OpCode[OpCode["Set"] =
|
|
574
|
+
OpCode[OpCode["Set"] = 69] = "Set";
|
|
566
575
|
/**
|
|
567
576
|
* SET_DYN %value %var %key\
|
|
568
577
|
* %var\[%key] = %value
|
|
569
578
|
*/
|
|
570
|
-
OpCode[OpCode["SetDyn"] =
|
|
579
|
+
OpCode[OpCode["SetDyn"] = 70] = "SetDyn";
|
|
571
580
|
/**
|
|
572
581
|
* SET_INDEX %value %var `index`\
|
|
573
582
|
* %var\[index] = %value
|
|
574
583
|
*/
|
|
575
|
-
OpCode[OpCode["SetIndex"] =
|
|
584
|
+
OpCode[OpCode["SetIndex"] = 71] = "SetIndex";
|
|
576
585
|
/**
|
|
577
586
|
* SLICE %ret %var `start` `end`\
|
|
578
587
|
* %ret = %var\[start..end]
|
|
579
588
|
*/
|
|
580
|
-
OpCode[OpCode["Slice"] =
|
|
589
|
+
OpCode[OpCode["Slice"] = 72] = "Slice";
|
|
581
590
|
/**
|
|
582
591
|
* SLICE_START %ret %var `end`\
|
|
583
592
|
* %ret = %var\[..end]
|
|
584
593
|
*/
|
|
585
|
-
OpCode[OpCode["SliceStart"] =
|
|
594
|
+
OpCode[OpCode["SliceStart"] = 73] = "SliceStart";
|
|
586
595
|
/**
|
|
587
596
|
* SLICE_END %ret %var `start`\
|
|
588
597
|
* %ret = %var\[start..]
|
|
589
598
|
*/
|
|
590
|
-
OpCode[OpCode["SliceEnd"] =
|
|
599
|
+
OpCode[OpCode["SliceEnd"] = 74] = "SliceEnd";
|
|
591
600
|
/**
|
|
592
601
|
* SLICE_DYN %ret %var %start %end\
|
|
593
602
|
* %ret = %var\[%start..%end]
|
|
594
603
|
*/
|
|
595
|
-
OpCode[OpCode["SliceDyn"] =
|
|
604
|
+
OpCode[OpCode["SliceDyn"] = 75] = "SliceDyn";
|
|
596
605
|
/**
|
|
597
606
|
* SLICE_EXCLUSIVE_DYN %ret %var %start %end\
|
|
598
607
|
* %ret = %var\[%start..<%end]
|
|
599
608
|
*/
|
|
600
|
-
OpCode[OpCode["SliceExclusiveDyn"] =
|
|
609
|
+
OpCode[OpCode["SliceExclusiveDyn"] = 76] = "SliceExclusiveDyn";
|
|
601
610
|
/**
|
|
602
611
|
* LENGTH %ret %var\
|
|
603
612
|
* %ret = $Length(%var)
|
|
604
613
|
*/
|
|
605
|
-
OpCode[OpCode["Length"] =
|
|
614
|
+
OpCode[OpCode["Length"] = 77] = "Length";
|
|
606
615
|
/**
|
|
607
616
|
* LOOP `regn`\
|
|
608
617
|
* loop { let %1, .. ,%regn;
|
|
609
618
|
*/
|
|
610
|
-
OpCode[OpCode["Loop"] =
|
|
619
|
+
OpCode[OpCode["Loop"] = 78] = "Loop";
|
|
611
620
|
/**
|
|
612
621
|
* LOOP_FOR `regn` %iterable\
|
|
613
622
|
* for %1 in %iterable { let %2, .. ,%regn;
|
|
614
623
|
*/
|
|
615
|
-
OpCode[OpCode["LoopFor"] =
|
|
624
|
+
OpCode[OpCode["LoopFor"] = 79] = "LoopFor";
|
|
616
625
|
/**
|
|
617
626
|
* LOOP_RANGE `regn` %start %end\
|
|
618
627
|
* for %1 in %start..%end { let %2, .. ,%regn;
|
|
619
628
|
*/
|
|
620
|
-
OpCode[OpCode["LoopRange"] =
|
|
629
|
+
OpCode[OpCode["LoopRange"] = 80] = "LoopRange";
|
|
621
630
|
/**
|
|
622
631
|
* LOOP_RANGE_EXCLUSIVE `regn` %start %end\
|
|
623
632
|
* for %1 in %start..<%end { let %2, .. ,%regn;
|
|
624
633
|
*/
|
|
625
|
-
OpCode[OpCode["LoopRangeExclusive"] =
|
|
634
|
+
OpCode[OpCode["LoopRangeExclusive"] = 81] = "LoopRangeExclusive";
|
|
626
635
|
/**
|
|
627
636
|
* LOOP_END\
|
|
628
637
|
* }
|
|
629
638
|
*/
|
|
630
|
-
OpCode[OpCode["LoopEnd"] =
|
|
639
|
+
OpCode[OpCode["LoopEnd"] = 82] = "LoopEnd";
|
|
631
640
|
/**
|
|
632
641
|
* BREAK\
|
|
633
642
|
* break;
|
|
634
643
|
*/
|
|
635
|
-
OpCode[OpCode["Break"] =
|
|
644
|
+
OpCode[OpCode["Break"] = 83] = "Break";
|
|
636
645
|
/**
|
|
637
646
|
* CONTINUE\
|
|
638
647
|
* continue;
|
|
639
648
|
*/
|
|
640
|
-
OpCode[OpCode["Continue"] =
|
|
649
|
+
OpCode[OpCode["Continue"] = 84] = "Continue";
|
|
641
650
|
/**
|
|
642
651
|
* IF %cond\
|
|
643
652
|
* if (%cond) {
|
|
644
653
|
*/
|
|
645
|
-
OpCode[OpCode["If"] =
|
|
654
|
+
OpCode[OpCode["If"] = 85] = "If";
|
|
646
655
|
/**
|
|
647
656
|
* IF_NOT %cond\
|
|
648
657
|
* if (!%cond) {
|
|
649
658
|
*/
|
|
650
|
-
OpCode[OpCode["IfNot"] =
|
|
659
|
+
OpCode[OpCode["IfNot"] = 86] = "IfNot";
|
|
651
660
|
/**
|
|
652
661
|
* IF_INIT %var\
|
|
653
662
|
* if (initialized(%var)) {
|
|
654
663
|
*/
|
|
655
|
-
OpCode[OpCode["IfInit"] =
|
|
664
|
+
OpCode[OpCode["IfInit"] = 87] = "IfInit";
|
|
656
665
|
/**
|
|
657
666
|
* IF_NOT_INIT %var\
|
|
658
667
|
* if (!initialized(%var)) {
|
|
659
668
|
*/
|
|
660
|
-
OpCode[OpCode["IfNotInit"] =
|
|
669
|
+
OpCode[OpCode["IfNotInit"] = 88] = "IfNotInit";
|
|
661
670
|
/**
|
|
662
671
|
* IF_NIL %var\
|
|
663
672
|
* if (%var == nil) {
|
|
664
673
|
*/
|
|
665
|
-
OpCode[OpCode["IfNil"] =
|
|
674
|
+
OpCode[OpCode["IfNil"] = 89] = "IfNil";
|
|
666
675
|
/**
|
|
667
676
|
* IF_NOT_NIL %var\
|
|
668
677
|
* if (%var != nil) {
|
|
669
678
|
*/
|
|
670
|
-
OpCode[OpCode["IfNotNil"] =
|
|
679
|
+
OpCode[OpCode["IfNotNil"] = 90] = "IfNotNil";
|
|
671
680
|
/**
|
|
672
681
|
* ELSE\
|
|
673
682
|
* } else {
|
|
674
683
|
*/
|
|
675
|
-
OpCode[OpCode["Else"] =
|
|
684
|
+
OpCode[OpCode["Else"] = 91] = "Else";
|
|
676
685
|
/**
|
|
677
686
|
* EL_IF IF*\
|
|
678
687
|
* } else if *** {\
|
|
679
688
|
* This instruction must be followed by an `IF*` instruction\
|
|
680
689
|
*/
|
|
681
|
-
OpCode[OpCode["ElIf"] =
|
|
690
|
+
OpCode[OpCode["ElIf"] = 92] = "ElIf";
|
|
682
691
|
/**
|
|
683
692
|
* IF_END\
|
|
684
693
|
* }
|
|
685
694
|
*/
|
|
686
|
-
OpCode[OpCode["IfEnd"] =
|
|
695
|
+
OpCode[OpCode["IfEnd"] = 93] = "IfEnd";
|
|
687
696
|
/**
|
|
688
697
|
* FUNC %f `argn` `regn`\
|
|
689
698
|
* %f = (%1, %2, ... , %argn) => { let %argn+1, ... , %regn;
|
|
690
699
|
*/
|
|
691
|
-
OpCode[OpCode["Func"] =
|
|
700
|
+
OpCode[OpCode["Func"] = 94] = "Func";
|
|
692
701
|
/**
|
|
693
702
|
* FUNC_VARG %f `argn` `regn`\
|
|
694
703
|
* %f = (%1, %2, ... , %argn-1, ...%argn) => { let %argn+1, ... , %regn;
|
|
695
704
|
*/
|
|
696
|
-
OpCode[OpCode["FuncVarg"] =
|
|
705
|
+
OpCode[OpCode["FuncVarg"] = 95] = "FuncVarg";
|
|
697
706
|
/**
|
|
698
707
|
* FUNC_END\
|
|
699
708
|
* }
|
|
700
709
|
*/
|
|
701
|
-
OpCode[OpCode["FuncEnd"] =
|
|
710
|
+
OpCode[OpCode["FuncEnd"] = 96] = "FuncEnd";
|
|
702
711
|
/**
|
|
703
712
|
* RETURN %value\
|
|
704
713
|
* return %value;
|
|
705
714
|
*/
|
|
706
|
-
OpCode[OpCode["Return"] =
|
|
715
|
+
OpCode[OpCode["Return"] = 97] = "Return";
|
|
707
716
|
/**
|
|
708
717
|
* CALL %ret `f` `argn` %1 %2 ... %argn `spread_n` `spread_arg_a` ...\
|
|
709
718
|
* %ret = GLOBAL[CONSTANTS[f]](%1, %2, ... , %argn);
|
|
710
719
|
*
|
|
711
720
|
* If spread_arg_a is present, arg at that index will be spread
|
|
712
721
|
*/
|
|
713
|
-
OpCode[OpCode["Call"] =
|
|
722
|
+
OpCode[OpCode["Call"] = 98] = "Call";
|
|
714
723
|
/**
|
|
715
724
|
* CALL_DYN %ret %f `argn` %1 %2 ... %argn `spread_n` `spread_arg_a` ...\
|
|
716
725
|
* %ret = %f(%1, %2, ... , %argn);
|
|
717
726
|
*
|
|
718
727
|
* If spread_arg_a is present, arg at that index will be spread
|
|
719
728
|
*/
|
|
720
|
-
OpCode[OpCode["CallDyn"] =
|
|
729
|
+
OpCode[OpCode["CallDyn"] = 99] = "CallDyn";
|
|
721
730
|
})(OpCode || (OpCode = {}));
|
|
722
731
|
/** Diagnostic messages for MiraScript compiler and tools. */
|
|
723
732
|
export const DIAGNOSTIC_MESSAGES = Object.freeze({
|
|
724
|
-
"1001": "
|
|
725
|
-
"1002": "
|
|
726
|
-
"1003": "
|
|
727
|
-
"1004": "
|
|
728
|
-
"1005": "
|
|
729
|
-
"1006": "
|
|
730
|
-
"1007": "
|
|
731
|
-
"1008": "
|
|
732
|
-
"1009": "`$0`
|
|
733
|
-
"1010": "`$0`
|
|
734
|
-
"1011": "
|
|
735
|
-
"1012": "
|
|
736
|
-
"1013": "
|
|
737
|
-
"1014": "
|
|
738
|
-
"1015": "
|
|
739
|
-
"1016": "
|
|
740
|
-
"1017": "
|
|
741
|
-
"1018": "
|
|
742
|
-
"1019": "
|
|
743
|
-
"1020": "
|
|
744
|
-
"1021": "
|
|
745
|
-
"1022": "
|
|
746
|
-
"1023": "
|
|
747
|
-
"1024": "
|
|
748
|
-
"1025": "
|
|
749
|
-
"1026": "
|
|
750
|
-
"1027": "
|
|
751
|
-
"1028": "
|
|
752
|
-
"1029": "
|
|
753
|
-
"1030": "
|
|
754
|
-
"1031": "
|
|
755
|
-
"1032": "
|
|
756
|
-
"1033": "
|
|
757
|
-
"1034": "
|
|
758
|
-
"1035": "
|
|
759
|
-
"1036": "
|
|
760
|
-
"1037": "
|
|
761
|
-
"1038": "`type`
|
|
762
|
-
"1039": "
|
|
763
|
-
"1040": "
|
|
764
|
-
"1041": "
|
|
765
|
-
"1042": "
|
|
766
|
-
"1043": "
|
|
767
|
-
"1044": "
|
|
768
|
-
"1045": "
|
|
769
|
-
"1046": "
|
|
770
|
-
"1047": "
|
|
771
|
-
"1048": "
|
|
772
|
-
"1049": "
|
|
773
|
-
"1050": "
|
|
774
|
-
"1051": "
|
|
775
|
-
"1052": "
|
|
776
|
-
"1053": "
|
|
777
|
-
"1054": "
|
|
778
|
-
"1055": "
|
|
779
|
-
"1056": "
|
|
780
|
-
"1057": "
|
|
781
|
-
"1058": "
|
|
782
|
-
"1059": "
|
|
783
|
-
"1060": "
|
|
784
|
-
"1061": "
|
|
785
|
-
"1062": "
|
|
786
|
-
"1063": "
|
|
787
|
-
"1064": "
|
|
788
|
-
"1065": "
|
|
789
|
-
"1066": "
|
|
790
|
-
"1067": "
|
|
791
|
-
"1068": "
|
|
792
|
-
"1069": "
|
|
793
|
-
"1070": "
|
|
794
|
-
"
|
|
795
|
-
"
|
|
796
|
-
"
|
|
797
|
-
"
|
|
798
|
-
"
|
|
799
|
-
"
|
|
800
|
-
"
|
|
801
|
-
"
|
|
802
|
-
"
|
|
803
|
-
"
|
|
804
|
-
"
|
|
805
|
-
"
|
|
806
|
-
"
|
|
807
|
-
"
|
|
808
|
-
"
|
|
809
|
-
"
|
|
810
|
-
"
|
|
811
|
-
"
|
|
812
|
-
"
|
|
813
|
-
"
|
|
814
|
-
"
|
|
815
|
-
"
|
|
816
|
-
"
|
|
817
|
-
"
|
|
818
|
-
"
|
|
733
|
+
"1001": "发生未知内部错误",
|
|
734
|
+
"1002": "发生未知词法错误",
|
|
735
|
+
"1003": "发生未知解析错误",
|
|
736
|
+
"1004": "发生未知生成错误",
|
|
737
|
+
"1005": "发生未知优化错误",
|
|
738
|
+
"1006": "该功能尚未实现",
|
|
739
|
+
"1007": "遇到未知的记号",
|
|
740
|
+
"1008": "发现意外的记号",
|
|
741
|
+
"1009": "`$0` 是保留关键字,不能用作标识符",
|
|
742
|
+
"1010": "`$0` 是关键字,不能用作标识符",
|
|
743
|
+
"1011": "数字字面量不能以下划线开头或结尾",
|
|
744
|
+
"1012": "无效的数字字面量",
|
|
745
|
+
"1013": "数字字面量过大",
|
|
746
|
+
"1014": "整数字面量过大",
|
|
747
|
+
"1015": "无效的序数字面量;请移除前导零和下划线,或改用 `[$0]`",
|
|
748
|
+
"1016": "字符串字面量未终止",
|
|
749
|
+
"1017": "字符串中的转义序列无效",
|
|
750
|
+
"1018": "十六进制转义序列的值不是有效的 ASCII 字符",
|
|
751
|
+
"1019": "Unicode 转义序列的值不是有效的 Unicode 码点",
|
|
752
|
+
"1020": "在 `..` 之后需要表达式",
|
|
753
|
+
"1021": "插值表达式未终止",
|
|
754
|
+
"1022": "无效的插值表达式",
|
|
755
|
+
"1023": "插值表达式为空",
|
|
756
|
+
"1024": "意外的 `_`;它是用于丢弃值的保留关键字",
|
|
757
|
+
"1025": "意外的 `global`;它是用于全局变量的保留关键字",
|
|
758
|
+
"1026": "列表中缺少 `,`",
|
|
759
|
+
"1027": "缺少 `]` 以关闭中括号",
|
|
760
|
+
"1028": "缺少 `{` 以打开花括号",
|
|
761
|
+
"1029": "缺少 `}` 以关闭花括号",
|
|
762
|
+
"1030": "缺少 `)` 以关闭括号",
|
|
763
|
+
"1031": "语句末尾缺少 `;`",
|
|
764
|
+
"1032": "条件表达式中缺少 `:`",
|
|
765
|
+
"1033": "在 bind 或 const 语句中需要 `=` 运算符",
|
|
766
|
+
"1034": "常量名必须以 `@` 开头",
|
|
767
|
+
"1035": "声明中缺少函数名",
|
|
768
|
+
"1036": "声明中缺少模块名",
|
|
769
|
+
"1037": "扩展调用必须以参数列表结尾;请在此处添加 `(`",
|
|
770
|
+
"1038": "`type` 是类函数关键字;请在此处添加 `(`",
|
|
771
|
+
"1039": "`type` 调用必须恰好有一个参数",
|
|
772
|
+
"1040": "意外的记录字面量;此处需要分组表达式",
|
|
773
|
+
"1041": "语句中缺少 `case`",
|
|
774
|
+
"1042": "遇到未知的表达式",
|
|
775
|
+
"1043": "发现未匹配的 `}`",
|
|
776
|
+
"1044": "发现未匹配的 `]`",
|
|
777
|
+
"1045": "发现未匹配的 `)`",
|
|
778
|
+
"1046": "遇到未知的模式",
|
|
779
|
+
"1047": "此处只允许常量或字面量",
|
|
780
|
+
"1048": "遇到未知的语句",
|
|
781
|
+
"1049": "此处需要表达式",
|
|
782
|
+
"1050": "此处需要模式",
|
|
783
|
+
"1051": "字面量模式中不允许 `!` 运算符",
|
|
784
|
+
"1052": "重绑定时不允许使用 `mut`",
|
|
785
|
+
"1053": "名称以 `@` 开头的变量不允许被重绑定",
|
|
786
|
+
"1054": "弃元模式中不能使用 `mut`",
|
|
787
|
+
"1055": "展开模式中应省略丢弃弃元",
|
|
788
|
+
"1056": "记录模式中不允许展开弃元",
|
|
789
|
+
"1057": "记录模式中的展开模式应为最后一个字段",
|
|
790
|
+
"1058": "记录模式中不允许插值名称",
|
|
791
|
+
"1059": "省略记录字段名时需要绑定模式",
|
|
792
|
+
"1060": "数组模式中的范围模式应加括号",
|
|
793
|
+
"1061": "数组模式中展开模式只能使用一次",
|
|
794
|
+
"1062": "函数声明中剩余参数应为最后一个参数",
|
|
795
|
+
"1063": "不能对未声明的变量赋值",
|
|
796
|
+
"1064": "不能对不可变变量赋值...",
|
|
797
|
+
"1065": "变量无法在此之前访问...",
|
|
798
|
+
"1066": "该变量已...",
|
|
799
|
+
"1067": "在循环之外出现意外的 `break`",
|
|
800
|
+
"1068": "在循环之外出现意外的 `continue`",
|
|
801
|
+
"1069": "`global` 关键字只能用作 `global.<name>`、`global[<name>]` 或 `in` 运算符右侧",
|
|
802
|
+
"1070": "无法从表达式推断键名",
|
|
803
|
+
"1071": "只能对变量或字段访问赋值",
|
|
804
|
+
"1072": "在模块声明之外出现意外的 `pub`",
|
|
805
|
+
"2001": "`$0` 不是空值;显式使用全局变量 `global.$0` 或空值 `nil`",
|
|
806
|
+
"2002": "不可失败匹配中的该模式是多余的;请考虑移除它或改为在 `is` 表达式中使用",
|
|
807
|
+
"2003": "该 `match` 表达式没有分支;它永远不会匹配任何值",
|
|
808
|
+
"2004": "范围中不能使用非数字字面量",
|
|
809
|
+
"2005": "比较表达式中不能使用非数字或字符串字面量",
|
|
810
|
+
"2006": "算术表达式中不能使用非数字字面量",
|
|
811
|
+
"2007": "逻辑表达式中不能使用非布尔字面量",
|
|
812
|
+
"2008": "字面量不能作为函数调用",
|
|
813
|
+
"2009": "字面量不能作为记录或数组访问",
|
|
814
|
+
"2010": "全局变量 `$0` 未声明",
|
|
815
|
+
"4001": "局部变量未使用;请考虑删除它或使用 `_` 忽略",
|
|
816
|
+
"4002": "局部函数未使用;请考虑删除它",
|
|
817
|
+
"4003": "逻辑运算中更推荐使用 `&&` 而非 `and`",
|
|
818
|
+
"4004": "逻辑运算中更推荐使用 `||` 而非 `or`",
|
|
819
|
+
"4005": "逻辑运算中更推荐使用 `!` 而非 `not`",
|
|
820
|
+
"4006": "记录字面量声明中更推荐使用 `()` 而非 `{}`",
|
|
821
|
+
"4007": "更推荐使用 if 表达式而非条件表达式",
|
|
822
|
+
"4008": "考虑移除多余的括号",
|
|
823
|
+
"4009": "常量 $0 建议使用大写",
|
|
824
|
+
"5001": "...在此处声明",
|
|
825
|
+
"5002": "...在此处声明",
|
|
826
|
+
"5003": "...在此处作为参数声明",
|
|
827
|
+
"5004": "...在此处被该函数声明为自动参数 `it`",
|
|
828
|
+
"5005": "...在此处作为剩余参数声明",
|
|
829
|
+
"5006": "...在此处作为参数模式的子模式声明"
|
|
819
830
|
});
|
|
820
831
|
/** MiraScript keywords */
|
|
821
832
|
export const KEYWORDS = Object.freeze(["true", "false", "nil", "nan", "inf", "_", "global", "in", "is", "and", "or", "not", "type", "if", "else", "match", "case", "for", "while", "loop", "break", "continue", "return", "fn", "op", "let", "const", "mut", "where", "mod", "pub", "use", "effect", "try", "handle", "finally", "perform", "resume"]);
|
|
@@ -826,5 +837,5 @@ export const CONTROL_KEYWORDS = Object.freeze(["if", "else", "match", "case", "f
|
|
|
826
837
|
/** MiraScript numeric keywords */
|
|
827
838
|
export const NUMERIC_KEYWORDS = Object.freeze(["nan", "inf"]);
|
|
828
839
|
/** MiraScript reserved keywords */
|
|
829
|
-
export const RESERVED_KEYWORDS = Object.freeze(["op", "where", "
|
|
840
|
+
export const RESERVED_KEYWORDS = Object.freeze(["op", "where", "use", "effect", "try", "handle", "finally", "perform", "resume"]);
|
|
830
841
|
//# sourceMappingURL=constants.g.js.map
|