@keymanapp/kmc-kmn 19.0.276-alpha → 19.0.277-alpha
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/build/src/compiler/kmn-compiler-messages.d.ts +192 -199
- package/build/src/compiler/kmn-compiler-messages.d.ts.map +1 -1
- package/build/src/compiler/kmn-compiler-messages.js +202 -179
- package/build/src/compiler/kmn-compiler-messages.js.map +1 -1
- package/build/src/import/kmcmplib/wasm-host.wasm +0 -0
- package/build/src/kmw-compiler/util.js +3 -3
- package/build/src/kmw-compiler/util.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,24 +1,38 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e152753c-bec6-554f-a6d5-606ef41218c9")}catch(e){}}();
|
|
3
3
|
import { kmnfile } from "../kmw-compiler/compiler-globals.js";
|
|
4
|
-
import { CompilerErrorNamespace, CompilerErrorSeverity, CompilerMessageSpec
|
|
4
|
+
import { CompilerErrorNamespace, CompilerErrorSeverity, CompilerMessageSpec, CompilerMessageObjectSpec, CompilerMessageDef as def, CompilerMessageSpecWithException, KeymanUrls } from "@keymanapp/developer-utils";
|
|
5
5
|
const Namespace = CompilerErrorNamespace.KmnCompiler;
|
|
6
6
|
const SevInfo = CompilerErrorSeverity.Info | Namespace;
|
|
7
7
|
const SevHint = CompilerErrorSeverity.Hint | Namespace;
|
|
8
8
|
const SevWarn = CompilerErrorSeverity.Warn | Namespace;
|
|
9
9
|
const SevError = CompilerErrorSeverity.Error | Namespace;
|
|
10
10
|
const SevFatal = CompilerErrorSeverity.Fatal | Namespace;
|
|
11
|
-
// For messages from the KeymanWeb compiler, we need to construct our messages
|
|
12
|
-
// slightly differently. This could be refactored in the future, as it is not
|
|
13
|
-
// obvious which messages should use which function.
|
|
14
|
-
// Specifically, this could perhaps use CompilerFileCallbacks which provides a
|
|
15
|
-
// default filename.
|
|
16
|
-
// Then, there could be a CompilerMessageSpecWithLine
|
|
17
11
|
const mw = (code, message, o) => ({
|
|
18
|
-
...
|
|
12
|
+
...CompilerMessageSpec(code, message),
|
|
19
13
|
filename: o?.filename ?? kmnfile,
|
|
20
14
|
line: o?.line,
|
|
15
|
+
kmcKmnSource: "kmw-compiler",
|
|
21
16
|
});
|
|
17
|
+
// messages from kmcmplib component (mc)
|
|
18
|
+
const mc = (code, message, detail) => ({
|
|
19
|
+
...CompilerMessageSpec(code, message, detail),
|
|
20
|
+
kmcKmnSource: "kmcmplib",
|
|
21
|
+
});
|
|
22
|
+
// messages from kmc-kmn component (m, mx)
|
|
23
|
+
const m = (code, message, detail) => ({
|
|
24
|
+
...CompilerMessageSpec(code, message, detail),
|
|
25
|
+
kmcKmnSource: "kmc-kmn",
|
|
26
|
+
});
|
|
27
|
+
const mx = (code, context, message, detail) => ({
|
|
28
|
+
...CompilerMessageObjectSpec(code, context, message, detail),
|
|
29
|
+
kmcKmnSource: "kmc-kmn",
|
|
30
|
+
});
|
|
31
|
+
const kmcKmnCompilerMessageSpecWithException = (code, message, exceptionVar, detail) => ({
|
|
32
|
+
...CompilerMessageSpecWithException(code, message, exceptionVar, detail),
|
|
33
|
+
kmcKmnSource: "kmc-kmn",
|
|
34
|
+
});
|
|
35
|
+
//
|
|
22
36
|
export var KmnCompilerMessageRanges;
|
|
23
37
|
(function (KmnCompilerMessageRanges) {
|
|
24
38
|
KmnCompilerMessageRanges[KmnCompilerMessageRanges["RANGE_KMN_COMPILER_MIN"] = 1] = "RANGE_KMN_COMPILER_MIN";
|
|
@@ -44,41 +58,42 @@ export function keyAddress(address) {
|
|
|
44
58
|
* Error messages reported by the .kmn compiler. The error codes in this class
|
|
45
59
|
* share an address space with messages from kmn_compiler_errors.h, which are
|
|
46
60
|
* generated by kmcmplib, so codes below 0x900 are reserved for kmcmplib
|
|
47
|
-
* messages.
|
|
61
|
+
* messages. These messages should use `m()`, `mx()`, or
|
|
62
|
+
* `kmcKmnCompilerMessageSpecWithException()` calls.
|
|
48
63
|
*
|
|
49
|
-
* The second half of this class defines
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
64
|
+
* The second half of this class defines messages from kmcmplib or the kmw
|
|
65
|
+
* compiler. For historical reasons, these messages are not in separate numeric
|
|
66
|
+
* ranges. These messages should correspond to codes in kmn_compiler_errors.h,
|
|
67
|
+
* exclusive severity bits. For messages generated by kmcmplib, any parameters
|
|
68
|
+
* must use the KmcmpLibMessageParameters type, not named parameters. kmcmplib
|
|
69
|
+
* messages must use `mc()` and kmw compiler messages must use `mw()` calls.
|
|
55
70
|
*
|
|
56
71
|
* `CERR_` messages that are actually fatals have been renamed to `FATAL_`.
|
|
57
72
|
*
|
|
58
73
|
* @example
|
|
59
74
|
*
|
|
60
|
-
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
|
|
75
|
+
*```
|
|
76
|
+
* kmcmplib.CERR_BadCallParams = CERR_FATAL | 0x002 = 0x8002
|
|
77
|
+
* ERROR_BadCallParams = SevError | 0x0002 = 0x300000 | 0x2000 | 0x002 = 0x302002
|
|
78
|
+
*```
|
|
64
79
|
*/
|
|
65
80
|
export class KmnCompilerMessages {
|
|
66
|
-
//
|
|
67
|
-
// kmc-kmn
|
|
68
|
-
//
|
|
81
|
+
// ------------------------------------------------------------------------------------------------
|
|
82
|
+
// kmc-kmn compiler messages - 0x900-0xFFF (RANGE_CompilerMessage_Min..RANGE_CompilerMessage_Max)
|
|
83
|
+
// ------------------------------------------------------------------------------------------------
|
|
69
84
|
static FATAL_UnexpectedException = SevFatal | 0x900;
|
|
70
|
-
static Fatal_UnexpectedException = (o) =>
|
|
85
|
+
static Fatal_UnexpectedException = (o) => kmcKmnCompilerMessageSpecWithException(this.FATAL_UnexpectedException, null, o.e ?? 'unknown error', `Raised when KmnCompiler or one of its components has an internal
|
|
71
86
|
error. If you experience this error, it should be reported to the Keyman
|
|
72
87
|
team for resolution via ${KeymanUrls.NEW_KEYMAN_ISSUE()}.`);
|
|
73
88
|
static FATAL_MissingWasmModule = SevFatal | 0x901;
|
|
74
|
-
static Fatal_MissingWasmModule = (o) =>
|
|
89
|
+
static Fatal_MissingWasmModule = (o) => kmcKmnCompilerMessageSpecWithException(this.FATAL_MissingWasmModule, `Could not instantiate WASM compiler module or initialization failed`, o.e ?? 'unknown error', `Raised when the kmcmplib component could not be instantiated. This may indicate
|
|
75
90
|
a configuration or dependency issue. Make sure you are running a Javascript
|
|
76
91
|
engine that supports WASM, and that use of WASM is enabled.`);
|
|
77
92
|
// Note: this is now unused
|
|
78
93
|
// static FATAL_UnableToSetCompilerOptions = SevFatal | 0x902;
|
|
79
94
|
// static Fatal_UnableToSetCompilerOptions = () => m(this.FATAL_UnableToSetCompilerOptions, null, `Unable to set compiler options`);
|
|
80
95
|
static FATAL_CallbacksNotSet = SevFatal | 0x903;
|
|
81
|
-
static Fatal_CallbacksNotSet = () =>
|
|
96
|
+
static Fatal_CallbacksNotSet = () => kmcKmnCompilerMessageSpecWithException(this.FATAL_CallbacksNotSet, null, `Callbacks were not set with init`, `Raised when KmnCompiler or one of its components experiences an internal
|
|
82
97
|
error. If you experience this error, it should be reported to the Keyman
|
|
83
98
|
team for resolution via ${KeymanUrls.NEW_KEYMAN_ISSUE()}.`);
|
|
84
99
|
static FATAL_UnicodeSetOutOfRange = SevFatal | 0x904;
|
|
@@ -134,163 +149,169 @@ export class KmnCompilerMessages {
|
|
|
134
149
|
static ERROR_FileNotFound = SevError | 0x90C;
|
|
135
150
|
static Error_FileNotFound = (o) => m(this.ERROR_FileNotFound, `File ${def(o.filename)} was not found`, `The file was not found on the disk. Verify that you have the correct path
|
|
136
151
|
to the file.`);
|
|
152
|
+
//
|
|
153
|
+
// ------------------------------------------------------------------------------------------------
|
|
154
|
+
// kmcmplib messages - 0x000-0x8FF
|
|
155
|
+
//
|
|
156
|
+
// All parameters must be KmcmpLibMessageParameters type
|
|
157
|
+
// ------------------------------------------------------------------------------------------------
|
|
158
|
+
//
|
|
137
159
|
// static STATUS_None = 0x000; // This is not a real error
|
|
138
160
|
// static STATUS_EndOfFile = 0x001; // This is not a real error
|
|
139
161
|
static FATAL_BadCallParams = SevFatal | 0x002;
|
|
140
|
-
static Fatal_BadCallParams = () =>
|
|
162
|
+
static Fatal_BadCallParams = () => mc(this.FATAL_BadCallParams, `CompileKeyboardFile was called with bad parameters`);
|
|
141
163
|
static FATAL_CannotAllocateMemory = SevFatal | 0x004;
|
|
142
|
-
static Fatal_CannotAllocateMemory = () =>
|
|
164
|
+
static Fatal_CannotAllocateMemory = () => mc(this.FATAL_CannotAllocateMemory, `Out of memory`);
|
|
143
165
|
static ERROR_InfileNotExist = SevError | 0x005; // #10678: reduced from fatal to error in 17.0
|
|
144
|
-
static Error_InfileNotExist = () =>
|
|
166
|
+
static Error_InfileNotExist = () => mc(this.ERROR_InfileNotExist, `Cannot find the input file`);
|
|
145
167
|
// static ERROR_CannotCreateOutfile = SevError | 0x006; // #10678: reduced from fatal to error in 17.0, but unused
|
|
146
|
-
// static Error_CannotCreateOutfile = () =>
|
|
168
|
+
// static Error_CannotCreateOutfile = () => mc(this.ERROR_CannotCreateOutfile, `Cannot open output file for writing`); unused
|
|
147
169
|
// static FATAL_UnableToWriteFully = SevFatal | 0x007;
|
|
148
|
-
// static Fatal_UnableToWriteFully = () =>
|
|
170
|
+
// static Fatal_UnableToWriteFully = () => mc(this.FATAL_UnableToWriteFully, `Unable to write the file completely`);
|
|
149
171
|
static ERROR_CannotReadInfile = SevError | 0x008; // #10678: reduced from fatal to error in 17.0
|
|
150
|
-
static Error_CannotReadInfile = () =>
|
|
172
|
+
static Error_CannotReadInfile = () => mc(this.ERROR_CannotReadInfile, `Cannot read the input file`);
|
|
151
173
|
static FATAL_SomewhereIGotItWrong = SevFatal | 0x009;
|
|
152
|
-
static Fatal_SomewhereIGotItWrong = () =>
|
|
174
|
+
static Fatal_SomewhereIGotItWrong = () => mc(this.FATAL_SomewhereIGotItWrong, `Internal error: contact Keyman`);
|
|
153
175
|
static ERROR_InvalidToken = SevError | 0x00A;
|
|
154
|
-
static Error_InvalidToken = () =>
|
|
155
|
-
// kmcmplib: static Error_InvalidBegin = () => m(this.ERROR_InvalidBegin, `Invalid 'begin' statement`);
|
|
176
|
+
static Error_InvalidToken = () => mc(this.ERROR_InvalidToken, `Invalid token found`);
|
|
156
177
|
static ERROR_InvalidBegin = SevError | 0x00B;
|
|
157
|
-
static Error_InvalidBegin = () =>
|
|
178
|
+
static Error_InvalidBegin = () => mc(this.ERROR_InvalidBegin, `A "begin unicode" statement is required to compile a KeymanWeb keyboard`);
|
|
158
179
|
static ERROR_InvalidName = SevError | 0x00C;
|
|
159
|
-
static Error_InvalidName = () =>
|
|
180
|
+
static Error_InvalidName = () => mc(this.ERROR_InvalidName, `Invalid 'name' statement`);
|
|
160
181
|
static ERROR_InvalidVersion = SevError | 0x00D;
|
|
161
|
-
static Error_InvalidVersion = () =>
|
|
182
|
+
static Error_InvalidVersion = () => mc(this.ERROR_InvalidVersion, `Invalid 'version' statement`);
|
|
162
183
|
static ERROR_InvalidLanguageLine = SevError | 0x00E;
|
|
163
|
-
static Error_InvalidLanguageLine = () =>
|
|
184
|
+
static Error_InvalidLanguageLine = () => mc(this.ERROR_InvalidLanguageLine, `Invalid 'language' statement`);
|
|
164
185
|
static ERROR_LayoutButNoLanguage = SevError | 0x00F;
|
|
165
|
-
static Error_LayoutButNoLanguage = () =>
|
|
186
|
+
static Error_LayoutButNoLanguage = () => mc(this.ERROR_LayoutButNoLanguage, `Layout statement found but no language statement`);
|
|
166
187
|
static ERROR_InvalidLayoutLine = SevError | 0x010;
|
|
167
|
-
static Error_InvalidLayoutLine = () =>
|
|
188
|
+
static Error_InvalidLayoutLine = () => mc(this.ERROR_InvalidLayoutLine, `Invalid 'layout' statement`);
|
|
168
189
|
static ERROR_NoVersionLine = SevError | 0x011;
|
|
169
|
-
static Error_NoVersionLine = () =>
|
|
190
|
+
static Error_NoVersionLine = () => mc(this.ERROR_NoVersionLine, `No version line found for file`);
|
|
170
191
|
static ERROR_InvalidGroupLine = SevError | 0x012;
|
|
171
|
-
static Error_InvalidGroupLine = () =>
|
|
192
|
+
static Error_InvalidGroupLine = () => mc(this.ERROR_InvalidGroupLine, `Invalid 'group' statement`);
|
|
172
193
|
static ERROR_InvalidStoreLine = SevError | 0x013;
|
|
173
|
-
static Error_InvalidStoreLine = () =>
|
|
194
|
+
static Error_InvalidStoreLine = () => mc(this.ERROR_InvalidStoreLine, `Invalid 'store' statement`);
|
|
174
195
|
static ERROR_InvalidCodeInKeyPartOfRule = SevError | 0x014;
|
|
175
|
-
static Error_InvalidCodeInKeyPartOfRule = () =>
|
|
196
|
+
static Error_InvalidCodeInKeyPartOfRule = () => mc(this.ERROR_InvalidCodeInKeyPartOfRule, `Invalid statement or code found in key part of rule`);
|
|
176
197
|
static ERROR_InvalidDeadkey = SevError | 0x015;
|
|
177
|
-
static Error_InvalidDeadkey = () =>
|
|
198
|
+
static Error_InvalidDeadkey = () => mc(this.ERROR_InvalidDeadkey, `Invalid 'deadkey' or 'dk' statement`);
|
|
178
199
|
static ERROR_InvalidValue = SevError | 0x016;
|
|
179
|
-
static Error_InvalidValue = () =>
|
|
200
|
+
static Error_InvalidValue = () => mc(this.ERROR_InvalidValue, `Invalid value in extended string`);
|
|
180
201
|
static ERROR_ZeroLengthString = SevError | 0x017;
|
|
181
|
-
static Error_ZeroLengthString = () =>
|
|
202
|
+
static Error_ZeroLengthString = () => mc(this.ERROR_ZeroLengthString, `A string of zero characters was found`);
|
|
182
203
|
static ERROR_TooManyIndexToKeyRefs = SevError | 0x018;
|
|
183
|
-
static Error_TooManyIndexToKeyRefs = () =>
|
|
204
|
+
static Error_TooManyIndexToKeyRefs = () => mc(this.ERROR_TooManyIndexToKeyRefs, `Too many index statements refering to key string`);
|
|
184
205
|
static ERROR_UnterminatedString = SevError | 0x019;
|
|
185
|
-
static Error_UnterminatedString = () =>
|
|
206
|
+
static Error_UnterminatedString = () => mc(this.ERROR_UnterminatedString, `Unterminated string in line`);
|
|
186
207
|
// static ERROR_StringInVirtualKeySection = SevError | 0x01A; // no longer used, see #12612
|
|
187
|
-
// static Error_StringInVirtualKeySection = () =>
|
|
208
|
+
// static Error_StringInVirtualKeySection = () => mc(this.ERROR_StringInVirtualKeySection, `extend string illegal in virtual key section`);
|
|
188
209
|
// static ERROR_AnyInVirtualKeySection = SevError | 0x01B; // no longer used, see #12612
|
|
189
|
-
// static Error_AnyInVirtualKeySection = () =>
|
|
210
|
+
// static Error_AnyInVirtualKeySection = () => mc(this.ERROR_AnyInVirtualKeySection, `'any' statement is illegal in virtual key section`);
|
|
190
211
|
static ERROR_InvalidAny = SevError | 0x01C;
|
|
191
|
-
static Error_InvalidAny = () =>
|
|
212
|
+
static Error_InvalidAny = () => mc(this.ERROR_InvalidAny, `Invalid 'any' statement`);
|
|
192
213
|
static ERROR_StoreDoesNotExist = SevError | 0x01D;
|
|
193
|
-
static Error_StoreDoesNotExist = () =>
|
|
214
|
+
static Error_StoreDoesNotExist = () => mc(this.ERROR_StoreDoesNotExist, `Store referenced does not exist`);
|
|
194
215
|
// static ERROR_BeepInVirtualKeySection = SevError | 0x01E; // no longer used, see #12612
|
|
195
|
-
// static Error_BeepInVirtualKeySection = () =>
|
|
216
|
+
// static Error_BeepInVirtualKeySection = () => mc(this.ERROR_BeepInVirtualKeySection, `'beep' statement is illegal in virtual key section`);
|
|
196
217
|
// static ERROR_IndexInVirtualKeySection = SevError | 0x01F; // no longer used, see #12612
|
|
197
|
-
// static Error_IndexInVirtualKeySection = () =>
|
|
218
|
+
// static Error_IndexInVirtualKeySection = () => mc(this.ERROR_IndexInVirtualKeySection, `'index' statement is illegal in virtual key section`);
|
|
198
219
|
static ERROR_InvalidIndex = SevError | 0x020;
|
|
199
|
-
static Error_InvalidIndex = () =>
|
|
220
|
+
static Error_InvalidIndex = () => mc(this.ERROR_InvalidIndex, `Invalid 'index' statement`);
|
|
200
221
|
// static ERROR_OutsInVirtualKeySection = SevError | 0x021; // no longer used, see #12612
|
|
201
|
-
// static Error_OutsInVirtualKeySection = () =>
|
|
222
|
+
// static Error_OutsInVirtualKeySection = () => mc(this.ERROR_OutsInVirtualKeySection, `'outs' statement is illegal in virtual key section`);
|
|
202
223
|
static ERROR_InvalidOuts = SevError | 0x022;
|
|
203
|
-
static Error_InvalidOuts = () =>
|
|
224
|
+
static Error_InvalidOuts = () => mc(this.ERROR_InvalidOuts, `Invalid 'outs' statement`);
|
|
204
225
|
// static ERROR_ContextInVirtualKeySection = SevError | 0x024; // no longer used, see #12612
|
|
205
|
-
// static Error_ContextInVirtualKeySection = () =>
|
|
226
|
+
// static Error_ContextInVirtualKeySection = () => mc(this.ERROR_ContextInVirtualKeySection, `'context' statement is illegal in virtual key section`);
|
|
206
227
|
static ERROR_InvalidUse = SevError | 0x025;
|
|
207
|
-
static Error_InvalidUse = () =>
|
|
228
|
+
static Error_InvalidUse = () => mc(this.ERROR_InvalidUse, `Invalid 'use' statement`);
|
|
208
229
|
static ERROR_GroupDoesNotExist = SevError | 0x026;
|
|
209
|
-
static Error_GroupDoesNotExist = () =>
|
|
230
|
+
static Error_GroupDoesNotExist = () => mc(this.ERROR_GroupDoesNotExist, `Group does not exist`);
|
|
210
231
|
static ERROR_VirtualKeyNotAllowedHere = SevError | 0x027;
|
|
211
|
-
static Error_VirtualKeyNotAllowedHere = () =>
|
|
232
|
+
static Error_VirtualKeyNotAllowedHere = () => mc(this.ERROR_VirtualKeyNotAllowedHere, `Virtual key is not allowed here`);
|
|
212
233
|
static ERROR_InvalidSwitch = SevError | 0x028;
|
|
213
|
-
static Error_InvalidSwitch = () =>
|
|
234
|
+
static Error_InvalidSwitch = () => mc(this.ERROR_InvalidSwitch, `Invalid 'switch' statement`);
|
|
214
235
|
static ERROR_NoTokensFound = SevError | 0x029;
|
|
215
|
-
static Error_NoTokensFound = () =>
|
|
236
|
+
static Error_NoTokensFound = () => mc(this.ERROR_NoTokensFound, `No tokens found in line`);
|
|
216
237
|
static ERROR_InvalidLineContinuation = SevError | 0x02A;
|
|
217
|
-
static Error_InvalidLineContinuation = () =>
|
|
238
|
+
static Error_InvalidLineContinuation = () => mc(this.ERROR_InvalidLineContinuation, `Invalid line continuation`);
|
|
218
239
|
static ERROR_LineTooLong = SevError | 0x02B;
|
|
219
|
-
static Error_LineTooLong = () =>
|
|
240
|
+
static Error_LineTooLong = () => mc(this.ERROR_LineTooLong, `Line too long`);
|
|
220
241
|
static ERROR_InvalidCopyright = SevError | 0x02C;
|
|
221
|
-
static Error_InvalidCopyright = () =>
|
|
242
|
+
static Error_InvalidCopyright = () => mc(this.ERROR_InvalidCopyright, `Invalid 'copyright' statement`);
|
|
222
243
|
static ERROR_CodeInvalidInThisSection = SevError | 0x02D;
|
|
223
|
-
static Error_CodeInvalidInThisSection = () =>
|
|
244
|
+
static Error_CodeInvalidInThisSection = () => mc(this.ERROR_CodeInvalidInThisSection, `This line is invalid in this section of the file`);
|
|
224
245
|
static ERROR_InvalidMessage = SevError | 0x02E;
|
|
225
|
-
static Error_InvalidMessage = () =>
|
|
246
|
+
static Error_InvalidMessage = () => mc(this.ERROR_InvalidMessage, `Invalid 'message' statement`);
|
|
226
247
|
static ERROR_InvalidLanguageName = SevError | 0x02F;
|
|
227
|
-
static Error_InvalidLanguageName = () =>
|
|
248
|
+
static Error_InvalidLanguageName = () => mc(this.ERROR_InvalidLanguageName, `Invalid 'languagename' statement`);
|
|
228
249
|
static ERROR_InvalidBitmapLine = SevError | 0x030;
|
|
229
|
-
static Error_InvalidBitmapLine = () =>
|
|
250
|
+
static Error_InvalidBitmapLine = () => mc(this.ERROR_InvalidBitmapLine, `Invalid 'bitmaps' statement`);
|
|
230
251
|
static ERROR_CannotReadBitmapFile = SevError | 0x031;
|
|
231
|
-
static Error_CannotReadBitmapFile = () =>
|
|
252
|
+
static Error_CannotReadBitmapFile = () => mc(this.ERROR_CannotReadBitmapFile, `Cannot open the bitmap or icon file for reading`);
|
|
232
253
|
static ERROR_IndexDoesNotPointToAny = SevError | 0x032;
|
|
233
|
-
static Error_IndexDoesNotPointToAny = () =>
|
|
254
|
+
static Error_IndexDoesNotPointToAny = () => mc(this.ERROR_IndexDoesNotPointToAny, `An index() in the output does not have a corresponding any() statement`);
|
|
234
255
|
static ERROR_ReservedCharacter = SevError | 0x033;
|
|
235
|
-
static Error_ReservedCharacter = () =>
|
|
256
|
+
static Error_ReservedCharacter = () => mc(this.ERROR_ReservedCharacter, `A reserved character was found`);
|
|
236
257
|
static ERROR_InvalidCharacter = SevError | 0x034;
|
|
237
|
-
static Error_InvalidCharacter = () =>
|
|
258
|
+
static Error_InvalidCharacter = () => mc(this.ERROR_InvalidCharacter, `A character was found that is outside the valid Unicode range (U+0000 - U+10FFFF)`);
|
|
238
259
|
static ERROR_InvalidCall = SevError | 0x035;
|
|
239
|
-
static Error_InvalidCall = () =>
|
|
260
|
+
static Error_InvalidCall = () => mc(this.ERROR_InvalidCall, `The 'call' statement is invalid`);
|
|
240
261
|
// static ERROR_CallInVirtualKeySection = SevError | 0x036; // no longer used, see #12612
|
|
241
|
-
// static Error_CallInVirtualKeySection = () =>
|
|
262
|
+
// static Error_CallInVirtualKeySection = () => mc(this.ERROR_CallInVirtualKeySection, `'call' statement is illegal in virtual key section`);
|
|
242
263
|
static ERROR_CodeInvalidInKeyStore = SevError | 0x037;
|
|
243
|
-
static Error_CodeInvalidInKeyStore = () =>
|
|
264
|
+
static Error_CodeInvalidInKeyStore = () => mc(this.ERROR_CodeInvalidInKeyStore, `The statement is invalid inside a store that is used in a key part of the rule`);
|
|
244
265
|
static ERROR_CannotLoadIncludeFile = SevError | 0x038;
|
|
245
|
-
static Error_CannotLoadIncludeFile = () =>
|
|
266
|
+
static Error_CannotLoadIncludeFile = () => mc(this.ERROR_CannotLoadIncludeFile, `Cannot load the included file: it is either invalid or does not exist`);
|
|
246
267
|
static ERROR_60FeatureOnly_EthnologueCode = SevError | 0x039;
|
|
247
|
-
static Error_60FeatureOnly_EthnologueCode = () =>
|
|
268
|
+
static Error_60FeatureOnly_EthnologueCode = () => mc(this.ERROR_60FeatureOnly_EthnologueCode, `EthnologueCode system store requires VERSION 6.0 or higher`);
|
|
248
269
|
static ERROR_60FeatureOnly_MnemonicLayout = SevError | 0x03A;
|
|
249
|
-
static Error_60FeatureOnly_MnemonicLayout = () =>
|
|
270
|
+
static Error_60FeatureOnly_MnemonicLayout = () => mc(this.ERROR_60FeatureOnly_MnemonicLayout, `MnemonicLayout functionality requires VERSION 6.0 or higher`);
|
|
250
271
|
static ERROR_60FeatureOnly_OldCharPosMatching = SevError | 0x03B;
|
|
251
|
-
static Error_60FeatureOnly_OldCharPosMatching = () =>
|
|
272
|
+
static Error_60FeatureOnly_OldCharPosMatching = () => mc(this.ERROR_60FeatureOnly_OldCharPosMatching, `OldCharPosMatching system store requires VERSION 6.0 or higher`);
|
|
252
273
|
static ERROR_60FeatureOnly_NamedCodes = SevError | 0x03C;
|
|
253
|
-
static Error_60FeatureOnly_NamedCodes = () =>
|
|
274
|
+
static Error_60FeatureOnly_NamedCodes = () => mc(this.ERROR_60FeatureOnly_NamedCodes, `Named character constants requires VERSION 6.0 or higher`);
|
|
254
275
|
static ERROR_60FeatureOnly_Contextn = SevError | 0x03D;
|
|
255
|
-
static Error_60FeatureOnly_Contextn = () =>
|
|
276
|
+
static Error_60FeatureOnly_Contextn = () => mc(this.ERROR_60FeatureOnly_Contextn, `Context(n) requires VERSION 6.0 or higher`);
|
|
256
277
|
static ERROR_501FeatureOnly_Call = SevError | 0x03E;
|
|
257
|
-
static Error_501FeatureOnly_Call = () =>
|
|
278
|
+
static Error_501FeatureOnly_Call = () => mc(this.ERROR_501FeatureOnly_Call, `Call() requires VERSION 5.01 or higher`);
|
|
258
279
|
static ERROR_InvalidNamedCode = SevError | 0x03F;
|
|
259
|
-
static Error_InvalidNamedCode = () =>
|
|
280
|
+
static Error_InvalidNamedCode = () => mc(this.ERROR_InvalidNamedCode, `Invalid named code constant`);
|
|
260
281
|
static ERROR_InvalidSystemStore = SevError | 0x040;
|
|
261
|
-
static Error_InvalidSystemStore = () =>
|
|
282
|
+
static Error_InvalidSystemStore = () => mc(this.ERROR_InvalidSystemStore, `Invalid system store name found`);
|
|
262
283
|
static ERROR_60FeatureOnly_VirtualCharKey = SevError | 0x044;
|
|
263
|
-
static Error_60FeatureOnly_VirtualCharKey = () =>
|
|
284
|
+
static Error_60FeatureOnly_VirtualCharKey = () => mc(this.ERROR_60FeatureOnly_VirtualCharKey, `Virtual character keys require VERSION 6.0 or higher`);
|
|
264
285
|
static ERROR_VersionAlreadyIncluded = SevError | 0x045;
|
|
265
|
-
static Error_VersionAlreadyIncluded = () =>
|
|
286
|
+
static Error_VersionAlreadyIncluded = () => mc(this.ERROR_VersionAlreadyIncluded, `Only one VERSION or store(version) line allowed in a source file.`);
|
|
266
287
|
static ERROR_70FeatureOnly = SevError | 0x046;
|
|
267
|
-
static Error_70FeatureOnly = () =>
|
|
288
|
+
static Error_70FeatureOnly = () => mc(this.ERROR_70FeatureOnly, `This feature requires store(version) '7.0' or higher`);
|
|
268
289
|
static ERROR_80FeatureOnly = SevError | 0x047;
|
|
269
|
-
static Error_80FeatureOnly = () =>
|
|
290
|
+
static Error_80FeatureOnly = () => mc(this.ERROR_80FeatureOnly, `This feature requires store(version) '8.0' or higher`);
|
|
270
291
|
// static ERROR_InvalidInVirtualKeySection = SevError | 0x048; // no longer used, see #12612
|
|
271
|
-
// static Error_InvalidInVirtualKeySection = () =>
|
|
292
|
+
// static Error_InvalidInVirtualKeySection = () => mc(this.ERROR_InvalidInVirtualKeySection, `This statement is not valid in a virtual key section`);
|
|
272
293
|
static ERROR_InvalidIf = SevError | 0x049;
|
|
273
|
-
static Error_InvalidIf = () =>
|
|
294
|
+
static Error_InvalidIf = () => mc(this.ERROR_InvalidIf, `The if() statement is not valid`);
|
|
274
295
|
static ERROR_InvalidReset = SevError | 0x04A;
|
|
275
|
-
static Error_InvalidReset = () =>
|
|
296
|
+
static Error_InvalidReset = () => mc(this.ERROR_InvalidReset, `The reset() statement is not valid`);
|
|
276
297
|
static ERROR_InvalidSet = SevError | 0x04B;
|
|
277
|
-
static Error_InvalidSet = () =>
|
|
298
|
+
static Error_InvalidSet = () => mc(this.ERROR_InvalidSet, `The set() statement is not valid`);
|
|
278
299
|
static ERROR_InvalidSave = SevError | 0x04C;
|
|
279
|
-
static Error_InvalidSave = () =>
|
|
300
|
+
static Error_InvalidSave = () => mc(this.ERROR_InvalidSave, `The save() statement is not valid`);
|
|
280
301
|
static ERROR_InvalidEthnologueCode = SevError | 0x04D;
|
|
281
|
-
static Error_InvalidEthnologueCode = () =>
|
|
302
|
+
static Error_InvalidEthnologueCode = () => mc(this.ERROR_InvalidEthnologueCode, `Invalid ethnologuecode format`);
|
|
282
303
|
static FATAL_CannotCreateTempfile = SevFatal | 0x04E;
|
|
283
|
-
static Fatal_CannotCreateTempfile = () =>
|
|
304
|
+
static Fatal_CannotCreateTempfile = () => mc(this.FATAL_CannotCreateTempfile, `Cannot create temp file`);
|
|
284
305
|
static ERROR_90FeatureOnly_IfSystemStores = SevError | 0x04F;
|
|
285
|
-
static Error_90FeatureOnly_IfSystemStores = () =>
|
|
306
|
+
static Error_90FeatureOnly_IfSystemStores = () => mc(this.ERROR_90FeatureOnly_IfSystemStores, `if(store) requires store(version) '9.0' or higher`);
|
|
286
307
|
static ERROR_IfSystemStore_NotFound = SevError | 0x050;
|
|
287
|
-
static Error_IfSystemStore_NotFound = () =>
|
|
308
|
+
static Error_IfSystemStore_NotFound = () => mc(this.ERROR_IfSystemStore_NotFound, `System store in if() not found`);
|
|
288
309
|
static ERROR_90FeatureOnly_SetSystemStores = SevError | 0x051;
|
|
289
|
-
static Error_90FeatureOnly_SetSystemStores = () =>
|
|
310
|
+
static Error_90FeatureOnly_SetSystemStores = () => mc(this.ERROR_90FeatureOnly_SetSystemStores, `set(store) requires store(version) '9.0' or higher`);
|
|
290
311
|
static ERROR_SetSystemStore_NotFound = SevError | 0x052;
|
|
291
|
-
static Error_SetSystemStore_NotFound = () =>
|
|
312
|
+
static Error_SetSystemStore_NotFound = () => mc(this.ERROR_SetSystemStore_NotFound, `System store in set() not found`);
|
|
292
313
|
static ERROR_90FeatureOnlyVirtualKeyDictionary = SevError | 0x053;
|
|
293
|
-
static Error_90FeatureOnlyVirtualKeyDictionary = () =>
|
|
314
|
+
static Error_90FeatureOnlyVirtualKeyDictionary = () => mc(this.ERROR_90FeatureOnlyVirtualKeyDictionary, `Custom virtual key names require store(version) '9.0'`);
|
|
294
315
|
static ERROR_NotSupportedInKeymanWebContext = SevError | 0x054;
|
|
295
316
|
static Error_NotSupportedInKeymanWebContext = (o) => mw(this.ERROR_NotSupportedInKeymanWebContext, `Statement '${def(o.code)}' is not currently supported in context for web and touch targets`, o);
|
|
296
317
|
static ERROR_NotSupportedInKeymanWebOutput = SevError | 0x055;
|
|
@@ -308,103 +329,103 @@ export class KmnCompilerMessages {
|
|
|
308
329
|
static ERROR_InvalidKeyCode = SevError | 0x05B;
|
|
309
330
|
static Error_InvalidKeyCode = (o) => mw(this.ERROR_InvalidKeyCode, `Invalid key identifier "${def(o.keyId)}"`);
|
|
310
331
|
static ERROR_90FeatureOnlyLayoutFile = SevError | 0x05C;
|
|
311
|
-
static Error_90FeatureOnlyLayoutFile = () =>
|
|
332
|
+
static Error_90FeatureOnlyLayoutFile = () => mc(this.ERROR_90FeatureOnlyLayoutFile, `Touch layout file reference requires store(version) '9.0' or higher`);
|
|
312
333
|
static ERROR_90FeatureOnlyKeyboardVersion = SevError | 0x05D;
|
|
313
|
-
static Error_90FeatureOnlyKeyboardVersion = () =>
|
|
334
|
+
static Error_90FeatureOnlyKeyboardVersion = () => mc(this.ERROR_90FeatureOnlyKeyboardVersion, `KeyboardVersion system store requires store(version) '9.0' or higher`);
|
|
314
335
|
static ERROR_KeyboardVersionFormatInvalid = SevError | 0x05E;
|
|
315
|
-
static Error_KeyboardVersionFormatInvalid = () =>
|
|
336
|
+
static Error_KeyboardVersionFormatInvalid = () => mc(this.ERROR_KeyboardVersionFormatInvalid, `KeyboardVersion format is invalid, expecting dot-separated integers`);
|
|
316
337
|
static ERROR_ContextExHasInvalidOffset = SevError | 0x05F;
|
|
317
|
-
static Error_ContextExHasInvalidOffset = () =>
|
|
338
|
+
static Error_ContextExHasInvalidOffset = () => mc(this.ERROR_ContextExHasInvalidOffset, `context() statement has offset out of range`);
|
|
318
339
|
static ERROR_90FeatureOnlyEmbedCSS = SevError | 0x060;
|
|
319
|
-
static Error_90FeatureOnlyEmbedCSS = () =>
|
|
340
|
+
static Error_90FeatureOnlyEmbedCSS = () => mc(this.ERROR_90FeatureOnlyEmbedCSS, `Embedding CSS requires store(version) '9.0' or higher`);
|
|
320
341
|
static ERROR_90FeatureOnlyTargets = SevError | 0x061;
|
|
321
|
-
static Error_90FeatureOnlyTargets = () =>
|
|
342
|
+
static Error_90FeatureOnlyTargets = () => mc(this.ERROR_90FeatureOnlyTargets, `TARGETS system store requires store(version) '9.0' or higher`);
|
|
322
343
|
static ERROR_ContextAndIndexInvalidInMatchNomatch = SevError | 0x062;
|
|
323
|
-
static Error_ContextAndIndexInvalidInMatchNomatch = () =>
|
|
344
|
+
static Error_ContextAndIndexInvalidInMatchNomatch = () => mc(this.ERROR_ContextAndIndexInvalidInMatchNomatch, `context and index statements cannot be used in a match or nomatch statement`);
|
|
324
345
|
static ERROR_140FeatureOnlyContextAndNotAnyWeb = SevError | 0x063;
|
|
325
|
-
static Error_140FeatureOnlyContextAndNotAnyWeb = () =>
|
|
346
|
+
static Error_140FeatureOnlyContextAndNotAnyWeb = () => mc(this.ERROR_140FeatureOnlyContextAndNotAnyWeb, `For web and touch platforms, context() statement referring to notany() requires store(version) '14.0' or higher`);
|
|
326
347
|
static ERROR_ExpansionMustFollowCharacterOrVKey = SevError | 0x064;
|
|
327
|
-
static Error_ExpansionMustFollowCharacterOrVKey = () =>
|
|
348
|
+
static Error_ExpansionMustFollowCharacterOrVKey = () => mc(this.ERROR_ExpansionMustFollowCharacterOrVKey, `An expansion must follow a character or a virtual key`);
|
|
328
349
|
static ERROR_VKeyExpansionMustBeFollowedByVKey = SevError | 0x065;
|
|
329
|
-
static Error_VKeyExpansionMustBeFollowedByVKey = () =>
|
|
350
|
+
static Error_VKeyExpansionMustBeFollowedByVKey = () => mc(this.ERROR_VKeyExpansionMustBeFollowedByVKey, `A virtual key expansion must be terminated by a virtual key`);
|
|
330
351
|
static ERROR_CharacterExpansionMustBeFollowedByCharacter = SevError | 0x066;
|
|
331
|
-
static Error_CharacterExpansionMustBeFollowedByCharacter = () =>
|
|
352
|
+
static Error_CharacterExpansionMustBeFollowedByCharacter = () => mc(this.ERROR_CharacterExpansionMustBeFollowedByCharacter, `A character expansion must be terminated by a character key`);
|
|
332
353
|
static ERROR_VKeyExpansionMustUseConsistentShift = SevError | 0x067;
|
|
333
|
-
static Error_VKeyExpansionMustUseConsistentShift = () =>
|
|
354
|
+
static Error_VKeyExpansionMustUseConsistentShift = () => mc(this.ERROR_VKeyExpansionMustUseConsistentShift, `A virtual key expansion must use the same shift state for both terminators`);
|
|
334
355
|
static ERROR_ExpansionMustBePositive = SevError | 0x068;
|
|
335
|
-
static Error_ExpansionMustBePositive = () =>
|
|
356
|
+
static Error_ExpansionMustBePositive = () => mc(this.ERROR_ExpansionMustBePositive, `An expansion must have positive difference (i.e. A-Z, not Z-A)`);
|
|
336
357
|
static ERROR_CasedKeysMustContainOnlyVirtualKeys = SevError | 0x069;
|
|
337
|
-
static Error_CasedKeysMustContainOnlyVirtualKeys = () =>
|
|
358
|
+
static Error_CasedKeysMustContainOnlyVirtualKeys = () => mc(this.ERROR_CasedKeysMustContainOnlyVirtualKeys, `The &CasedKeys system store must contain only virtual keys or characters found on a US English keyboard`);
|
|
338
359
|
static ERROR_CasedKeysMustNotIncludeShiftStates = SevError | 0x06A;
|
|
339
|
-
static Error_CasedKeysMustNotIncludeShiftStates = () =>
|
|
360
|
+
static Error_CasedKeysMustNotIncludeShiftStates = () => mc(this.ERROR_CasedKeysMustNotIncludeShiftStates, `The &CasedKeys system store must not include shift states`);
|
|
340
361
|
static ERROR_CasedKeysNotSupportedWithMnemonicLayout = SevError | 0x06B;
|
|
341
|
-
static Error_CasedKeysNotSupportedWithMnemonicLayout = () =>
|
|
362
|
+
static Error_CasedKeysNotSupportedWithMnemonicLayout = () => mc(this.ERROR_CasedKeysNotSupportedWithMnemonicLayout, `The &CasedKeys system store is not supported with mnemonic layouts`);
|
|
342
363
|
static ERROR_CannotUseReadWriteGroupFromReadonlyGroup = SevError | 0x06C;
|
|
343
|
-
static Error_CannotUseReadWriteGroupFromReadonlyGroup = () =>
|
|
364
|
+
static Error_CannotUseReadWriteGroupFromReadonlyGroup = () => mc(this.ERROR_CannotUseReadWriteGroupFromReadonlyGroup, `Group used from a readonly group must also be readonly`);
|
|
344
365
|
static ERROR_StatementNotPermittedInReadonlyGroup = SevError | 0x06D;
|
|
345
|
-
static Error_StatementNotPermittedInReadonlyGroup = () =>
|
|
366
|
+
static Error_StatementNotPermittedInReadonlyGroup = () => mc(this.ERROR_StatementNotPermittedInReadonlyGroup, `Statement is not permitted in output of readonly group`);
|
|
346
367
|
static ERROR_OutputInReadonlyGroup = SevError | 0x06E;
|
|
347
|
-
static Error_OutputInReadonlyGroup = () =>
|
|
368
|
+
static Error_OutputInReadonlyGroup = () => mc(this.ERROR_OutputInReadonlyGroup, `Output is not permitted in a readonly group`);
|
|
348
369
|
static ERROR_NewContextGroupMustBeReadonly = SevError | 0x06F;
|
|
349
|
-
static Error_NewContextGroupMustBeReadonly = () =>
|
|
370
|
+
static Error_NewContextGroupMustBeReadonly = () => mc(this.ERROR_NewContextGroupMustBeReadonly, `Group used in begin newContext must be readonly`);
|
|
350
371
|
static ERROR_PostKeystrokeGroupMustBeReadonly = SevError | 0x070;
|
|
351
|
-
static Error_PostKeystrokeGroupMustBeReadonly = () =>
|
|
372
|
+
static Error_PostKeystrokeGroupMustBeReadonly = () => mc(this.ERROR_PostKeystrokeGroupMustBeReadonly, `Group used in begin postKeystroke must be readonly`);
|
|
352
373
|
static ERROR_DuplicateGroup = SevError | 0x071;
|
|
353
|
-
static Error_DuplicateGroup = (o) =>
|
|
374
|
+
static Error_DuplicateGroup = (o) => mc(this.ERROR_DuplicateGroup, `A group with the name '${o.p?.[0]}' has already been defined on line ${o.p?.[1]}.`);
|
|
354
375
|
static ERROR_DuplicateStore = SevError | 0x072;
|
|
355
|
-
static Error_DuplicateStore = (o) =>
|
|
376
|
+
static Error_DuplicateStore = (o) => mc(this.ERROR_DuplicateStore, `A store with the name '${o.p?.[0]}' has already been defined on line ${o.p?.[1]}.`);
|
|
356
377
|
static ERROR_RepeatedBegin = SevError | 0x073;
|
|
357
|
-
static Error_RepeatedBegin = () =>
|
|
378
|
+
static Error_RepeatedBegin = () => mc(this.ERROR_RepeatedBegin, `Begin has already been set`);
|
|
358
379
|
static ERROR_VirtualKeyInContext = SevError | 0x074;
|
|
359
|
-
static Error_VirtualKeyInContext = () =>
|
|
380
|
+
static Error_VirtualKeyInContext = () => mc(this.ERROR_VirtualKeyInContext, `Virtual keys are not permitted in context`);
|
|
360
381
|
static ERROR_OutsTooLong = SevError | 0x075;
|
|
361
|
-
static Error_OutsTooLong = () =>
|
|
382
|
+
static Error_OutsTooLong = () => mc(this.ERROR_OutsTooLong, `Store cannot be inserted with outs() as it makes the extended string too long`);
|
|
362
383
|
static ERROR_ExtendedStringTooLong = SevError | 0x076;
|
|
363
|
-
static Error_ExtendedStringTooLong = () =>
|
|
384
|
+
static Error_ExtendedStringTooLong = () => mc(this.ERROR_ExtendedStringTooLong, `Extended string is too long`);
|
|
364
385
|
static ERROR_VirtualKeyExpansionTooLong = SevError | 0x077;
|
|
365
|
-
static Error_VirtualKeyExpansionTooLong = () =>
|
|
386
|
+
static Error_VirtualKeyExpansionTooLong = () => mc(this.ERROR_VirtualKeyExpansionTooLong, `Virtual key expansion is too large`);
|
|
366
387
|
static ERROR_CharacterRangeTooLong = SevError | 0x078;
|
|
367
|
-
static Error_CharacterRangeTooLong = () =>
|
|
388
|
+
static Error_CharacterRangeTooLong = () => mc(this.ERROR_CharacterRangeTooLong, `Character range is too large and cannot be expanded`);
|
|
368
389
|
static ERROR_NonBMPCharactersNotSupportedInKeySection = SevError | 0x079;
|
|
369
|
-
static Error_NonBMPCharactersNotSupportedInKeySection = () =>
|
|
390
|
+
static Error_NonBMPCharactersNotSupportedInKeySection = () => mc(this.ERROR_NonBMPCharactersNotSupportedInKeySection, `Characters with codepoints over U+FFFF are not supported in the key part of the rule`);
|
|
370
391
|
static ERROR_InvalidTarget = SevError | 0x07A;
|
|
371
|
-
static Error_InvalidTarget = (o) =>
|
|
392
|
+
static Error_InvalidTarget = (o) => mc(this.ERROR_InvalidTarget, `Unrecognized compile target '${o.p?.[0]}'`);
|
|
372
393
|
static ERROR_NoTargetsSpecified = SevError | 0x07B;
|
|
373
|
-
static Error_NoTargetsSpecified = () =>
|
|
394
|
+
static Error_NoTargetsSpecified = () => mc(this.ERROR_NoTargetsSpecified, `At least one compile target must be specified`);
|
|
374
395
|
static WARN_TooManyWarnings = SevWarn | 0x080;
|
|
375
|
-
static Warn_TooManyWarnings = () =>
|
|
396
|
+
static Warn_TooManyWarnings = () => mc(this.WARN_TooManyWarnings, `Too many warnings or errors`);
|
|
376
397
|
static WARN_OldVersion = SevWarn | 0x081;
|
|
377
|
-
static Warn_OldVersion = () =>
|
|
398
|
+
static Warn_OldVersion = () => mc(this.WARN_OldVersion, `The keyboard file is an old version`);
|
|
378
399
|
static WARN_BitmapNotUsed = SevWarn | 0x082;
|
|
379
|
-
static Warn_BitmapNotUsed = () =>
|
|
400
|
+
static Warn_BitmapNotUsed = () => mc(this.WARN_BitmapNotUsed, `The 'bitmaps' statement is obsolete and only the first bitmap referred to will be used, you should use 'bitmap'.`);
|
|
380
401
|
static WARN_CustomLanguagesNotSupported = SevWarn | 0x083;
|
|
381
|
-
static Warn_CustomLanguagesNotSupported = () =>
|
|
402
|
+
static Warn_CustomLanguagesNotSupported = () => mc(this.WARN_CustomLanguagesNotSupported, `Languages over 0x1FF, 0x1F are not supported correctly by Windows. You should use no LANGUAGE line instead.`);
|
|
382
403
|
static WARN_KeyBadLength = SevWarn | 0x084;
|
|
383
|
-
static Warn_KeyBadLength = () =>
|
|
404
|
+
static Warn_KeyBadLength = () => mc(this.WARN_KeyBadLength, `There are too many characters in the keystroke part of the rule.`);
|
|
384
405
|
static WARN_IndexStoreShort = SevWarn | 0x085;
|
|
385
|
-
static Warn_IndexStoreShort = () =>
|
|
406
|
+
static Warn_IndexStoreShort = () => mc(this.WARN_IndexStoreShort, `The store referenced in index() is shorter than the store referenced in any()`);
|
|
386
407
|
static WARN_UnicodeInANSIGroup = SevWarn | 0x086;
|
|
387
|
-
static Warn_UnicodeInANSIGroup = () =>
|
|
408
|
+
static Warn_UnicodeInANSIGroup = () => mc(this.WARN_UnicodeInANSIGroup, `A Unicode character was found in an ANSI group`);
|
|
388
409
|
static WARN_ANSIInUnicodeGroup = SevWarn | 0x087;
|
|
389
|
-
static Warn_ANSIInUnicodeGroup = () =>
|
|
410
|
+
static Warn_ANSIInUnicodeGroup = () => mc(this.WARN_ANSIInUnicodeGroup, `An ANSI character was found in a Unicode group`);
|
|
390
411
|
static WARN_UnicodeSurrogateUsed = SevWarn | 0x088;
|
|
391
|
-
static Warn_UnicodeSurrogateUsed = () =>
|
|
412
|
+
static Warn_UnicodeSurrogateUsed = () => mc(this.WARN_UnicodeSurrogateUsed, `A Unicode surrogate character was found. You should use Unicode scalar values to represent values > U+FFFF`);
|
|
392
413
|
static WARN_ReservedCharacter = SevWarn | 0x089;
|
|
393
|
-
static Warn_ReservedCharacter = () =>
|
|
414
|
+
static Warn_ReservedCharacter = () => mc(this.WARN_ReservedCharacter, `A Unicode character was found that should not be used`);
|
|
394
415
|
static INFO_MinimumCoreEngineVersion = SevInfo | 0x08A;
|
|
395
|
-
static Info_MinimumCoreEngineVersion = (o) =>
|
|
416
|
+
static Info_MinimumCoreEngineVersion = (o) => mc(this.INFO_MinimumCoreEngineVersion, `The compiler has assigned a minimum engine version of ${o.p?.[0]}.${o.p?.[1]} based on features used in this keyboard`);
|
|
396
417
|
static WARN_VirtualKeyWithMnemonicLayout = SevWarn | 0x08B;
|
|
397
|
-
static Warn_VirtualKeyWithMnemonicLayout = () =>
|
|
418
|
+
static Warn_VirtualKeyWithMnemonicLayout = () => mc(this.WARN_VirtualKeyWithMnemonicLayout, `Virtual key used instead of virtual character key with a mnemonic layout`);
|
|
398
419
|
static WARN_VirtualCharKeyWithPositionalLayout = SevWarn | 0x08C;
|
|
399
|
-
static Warn_VirtualCharKeyWithPositionalLayout = () =>
|
|
420
|
+
static Warn_VirtualCharKeyWithPositionalLayout = () => mc(this.WARN_VirtualCharKeyWithPositionalLayout, `Virtual character key used with a positional layout instead of mnemonic layout`);
|
|
400
421
|
static WARN_StoreAlreadyUsedAsOptionOrCall = SevWarn | 0x08D;
|
|
401
|
-
static Warn_StoreAlreadyUsedAsOptionOrCall = () =>
|
|
422
|
+
static Warn_StoreAlreadyUsedAsOptionOrCall = () => mc(this.WARN_StoreAlreadyUsedAsOptionOrCall, `Store already used as an option or in a call statement and should not be used as a normal store`);
|
|
402
423
|
static WARN_StoreAlreadyUsedAsStoreOrCall = SevWarn | 0x08E;
|
|
403
|
-
static Warn_StoreAlreadyUsedAsStoreOrCall = () =>
|
|
424
|
+
static Warn_StoreAlreadyUsedAsStoreOrCall = () => mc(this.WARN_StoreAlreadyUsedAsStoreOrCall, `Store already used as a normal store or in a call statement and should not be used as an option`);
|
|
404
425
|
static WARN_StoreAlreadyUsedAsStoreOrOption = SevWarn | 0x08F;
|
|
405
|
-
static Warn_StoreAlreadyUsedAsStoreOrOption = () =>
|
|
426
|
+
static Warn_StoreAlreadyUsedAsStoreOrOption = () => mc(this.WARN_StoreAlreadyUsedAsStoreOrOption, `Store already used as a normal store or as an option and should not be used in a call statement`);
|
|
406
427
|
static WARN_PunctuationInEthnologueCode = SevWarn | 0x090;
|
|
407
|
-
static Warn_PunctuationInEthnologueCode = () =>
|
|
428
|
+
static Warn_PunctuationInEthnologueCode = () => mc(this.WARN_PunctuationInEthnologueCode, `Punctuation should not be used to separate Ethnologue codes; instead use spaces`);
|
|
408
429
|
static WARN_TouchLayoutMissingLayer = SevWarn | 0x091;
|
|
409
430
|
static Warn_TouchLayoutMissingLayer = (o) => mw(this.WARN_TouchLayoutMissingLayer, `Key "${def(o.keyId)}" on platform "${def(o.platformName)}", layer "${def(o.layerId)}" (${keyAddress(o.address)}), references a missing layer "${def(o.nextLayer)}"`);
|
|
410
431
|
static WARN_TouchLayoutCustomKeyNotDefined = SevWarn | 0x092;
|
|
@@ -425,52 +446,52 @@ export class KmnCompilerMessages {
|
|
|
425
446
|
static Hint_UnreachableKeyCode = (o) => mw(this.HINT_UnreachableKeyCode, `The rule will never be matched for key ${def(o.key)} because its key code is never fired.`, o);
|
|
426
447
|
// static WARN_CouldNotCopyJsonFile = SevWarn | 0x09B;
|
|
427
448
|
static WARN_PlatformNotInTargets = SevWarn | 0x09C;
|
|
428
|
-
static Warn_PlatformNotInTargets = () =>
|
|
449
|
+
static Warn_PlatformNotInTargets = () => mc(this.WARN_PlatformNotInTargets, `The specified platform is not a target platform`);
|
|
429
450
|
static WARN_HeaderStatementIsDeprecated = SevWarn | 0x09D;
|
|
430
|
-
static Warn_HeaderStatementIsDeprecated = () =>
|
|
451
|
+
static Warn_HeaderStatementIsDeprecated = () => mc(this.WARN_HeaderStatementIsDeprecated, `Header statements are deprecated; use instead the equivalent system store`);
|
|
431
452
|
static WARN_UseNotLastStatementInRule = SevWarn | 0x09E;
|
|
432
|
-
static Warn_UseNotLastStatementInRule = () =>
|
|
453
|
+
static Warn_UseNotLastStatementInRule = () => mc(this.WARN_UseNotLastStatementInRule, `A rule with use() statements in the output should not have other content following the use() statements`);
|
|
433
454
|
static WARN_TouchLayoutFontShouldBeSameForAllPlatforms = SevWarn | 0x09F;
|
|
434
455
|
static Warn_TouchLayoutFontShouldBeSameForAllPlatforms = () => mw(this.WARN_TouchLayoutFontShouldBeSameForAllPlatforms, `The touch layout font should be the same for all platforms.`);
|
|
435
456
|
// static WARN_InvalidJSONMetadataFile = SevWarn | 0x0A0;
|
|
436
457
|
// static WARN_JSONMetadataOSKFontShouldMatchTouchFont = SevWarn | 0x0A1;
|
|
437
458
|
static WARN_KVKFileIsInSourceFormat = SevWarn | 0x0A2;
|
|
438
|
-
static Warn_KVKFileIsInSourceFormat = () =>
|
|
459
|
+
static Warn_KVKFileIsInSourceFormat = () => mc(this.WARN_KVKFileIsInSourceFormat, `.kvk file should be binary but is an XML file`);
|
|
439
460
|
// kmcmplib: static Warn_DontMixChiralAndNonChiralModifiers = () => m(this.WARN_DontMixChiralAndNonChiralModifiers, `Don't mix the use of left/right modifiers with non-left/right modifiers in the same platform`);
|
|
440
461
|
static WARN_DontMixChiralAndNonChiralModifiers = SevWarn | 0x0A3;
|
|
441
462
|
static Warn_DontMixChiralAndNonChiralModifiers = () => mw(this.WARN_DontMixChiralAndNonChiralModifiers, `This keyboard contains Ctrl,Alt and LCtrl,LAlt,RCtrl,RAlt sets of modifiers. Use only one or the other set for web target.`);
|
|
442
463
|
static WARN_MixingLeftAndRightModifiers = SevWarn | 0x0A4;
|
|
443
|
-
static Warn_MixingLeftAndRightModifiers = () =>
|
|
464
|
+
static Warn_MixingLeftAndRightModifiers = () => mc(this.WARN_MixingLeftAndRightModifiers, `Left and right modifiers should not both be used in the same rule`);
|
|
444
465
|
static WARN_LanguageHeadersDeprecatedInKeyman10 = SevWarn | 0x0A5;
|
|
445
|
-
static Warn_LanguageHeadersDeprecatedInKeyman10 = () =>
|
|
466
|
+
static Warn_LanguageHeadersDeprecatedInKeyman10 = () => mc(this.WARN_LanguageHeadersDeprecatedInKeyman10, `This language header has been deprecated in Keyman 10. Instead, add language metadata in the package file`);
|
|
446
467
|
static HINT_NonUnicodeFile = SevHint | 0x0A6;
|
|
447
|
-
static Hint_NonUnicodeFile = () =>
|
|
468
|
+
static Hint_NonUnicodeFile = () => mc(this.HINT_NonUnicodeFile, `Keyman Developer has detected that the file has ANSI encoding. Consider converting this file to UTF-8`);
|
|
448
469
|
// static WARN_TooManyErrorsOrWarnings = SevWarn | 0x0A7;
|
|
449
470
|
static WARN_HotkeyHasInvalidModifier = SevWarn | 0x0A8;
|
|
450
|
-
static Warn_HotkeyHasInvalidModifier = () =>
|
|
471
|
+
static Warn_HotkeyHasInvalidModifier = () => mc(this.WARN_HotkeyHasInvalidModifier, `Hotkey has modifiers that are not supported. Use only SHIFT, CTRL and ALT`);
|
|
451
472
|
static WARN_TouchLayoutSpecialLabelOnNormalKey = SevWarn | 0x0A9;
|
|
452
473
|
static Warn_TouchLayoutSpecialLabelOnNormalKey = (o) => mw(this.WARN_TouchLayoutSpecialLabelOnNormalKey, `Key "${def(o.keyId)}" on platform "${def(o.platformName)}", layer "${def(o.layerId)}" (${keyAddress(o.address)}) does not have ` +
|
|
453
474
|
`the key type "Special" or "Special (active)" but has the label "${def(o.label)}". This feature is only supported in Keyman 14 or later`);
|
|
454
475
|
static WARN_OptionStoreNameInvalid = SevWarn | 0x0AA;
|
|
455
476
|
static Warn_OptionStoreNameInvalid = (o) => mw(this.WARN_OptionStoreNameInvalid, `The option store ${def(o.name)} should be named with characters in the range A-Z, a-z, 0-9 and _ only.`);
|
|
456
477
|
static WARN_NulNotFirstStatementInContext = SevWarn | 0x0AB;
|
|
457
|
-
static Warn_NulNotFirstStatementInContext = () =>
|
|
478
|
+
static Warn_NulNotFirstStatementInContext = () => mc(this.WARN_NulNotFirstStatementInContext, `nul must be the first statement in the context`);
|
|
458
479
|
static WARN_IfShouldBeAtStartOfContext = SevWarn | 0x0AC;
|
|
459
|
-
static Warn_IfShouldBeAtStartOfContext = () =>
|
|
480
|
+
static Warn_IfShouldBeAtStartOfContext = () => mc(this.WARN_IfShouldBeAtStartOfContext, `if, platform and baselayout should be at start of context (after nul, if present)`);
|
|
460
481
|
static WARN_KeyShouldIncludeNCaps = SevWarn | 0x0AD;
|
|
461
|
-
static Warn_KeyShouldIncludeNCaps = () =>
|
|
482
|
+
static Warn_KeyShouldIncludeNCaps = () => mc(this.WARN_KeyShouldIncludeNCaps, `Other rules which reference this key include CAPS or NCAPS modifiers, so this rule must include NCAPS modifier to avoid inconsistent matches`);
|
|
462
483
|
static HINT_UnreachableRule = SevHint | 0x0AE;
|
|
463
|
-
static Hint_UnreachableRule = (o) =>
|
|
484
|
+
static Hint_UnreachableRule = (o) => mc(this.HINT_UnreachableRule, `This rule will never be matched as the rule on line ${o.p?.[0]} takes precedence`);
|
|
464
485
|
static WARN_VirtualKeyInOutput = SevWarn | 0x0AF;
|
|
465
|
-
static Warn_VirtualKeyInOutput = () =>
|
|
486
|
+
static Warn_VirtualKeyInOutput = () => mc(this.WARN_VirtualKeyInOutput, `Virtual keys are not supported in output`);
|
|
466
487
|
static HINT_IndexStoreLong = SevHint | 0x0B0;
|
|
467
|
-
static Hint_IndexStoreLong = () =>
|
|
488
|
+
static Hint_IndexStoreLong = () => mc(this.HINT_IndexStoreLong, `The store referenced in index() is longer than the store referenced in any()`);
|
|
468
489
|
static ERROR_ContextExCannotReferenceIf = SevError | 0x0B1;
|
|
469
|
-
static Error_ContextExCannotReferenceIf = () =>
|
|
490
|
+
static Error_ContextExCannotReferenceIf = () => mc(this.ERROR_ContextExCannotReferenceIf, `The offset in context() points to a non-character if() statement in the context`);
|
|
470
491
|
static ERROR_ContextExCannotReferenceNul = SevError | 0x0B2;
|
|
471
|
-
static Error_ContextExCannotReferenceNul = () =>
|
|
492
|
+
static Error_ContextExCannotReferenceNul = () => mc(this.ERROR_ContextExCannotReferenceNul, `The offset in context() points to a non-character nul statement in the context`);
|
|
472
493
|
static ERROR_TextBeforeOrAfterNulInOutput = SevError | 0x0B3;
|
|
473
|
-
static Error_TextBeforeOrAfterNulInOutput = () =>
|
|
494
|
+
static Error_TextBeforeOrAfterNulInOutput = () => mc(this.ERROR_TextBeforeOrAfterNulInOutput, `A rule with a nul statement in the output cannot also output text or text-emitting statements`, `If a rule has [\`nul\`](https://help.keyman.com/developer/language/reference/nul)
|
|
474
495
|
in the output, it means that it deletes any context referenced on the left-hand
|
|
475
496
|
side of the rule, and has no other output, so it does not make sense to have any
|
|
476
497
|
content apart from the \`nul\` statement in the output.
|
|
@@ -484,27 +505,29 @@ export class KmnCompilerMessages {
|
|
|
484
505
|
* [\`set()\`](https://help.keyman.com/developer/language/reference/set)
|
|
485
506
|
* [\`use()\`](https://help.keyman.com/developer/language/reference/use)`);
|
|
486
507
|
static ERROR_NameMustBeAtLeastOneCharLong = SevError | 0x0B4;
|
|
487
|
-
static Error_NameMustBeAtLeastOneCharLong = () =>
|
|
508
|
+
static Error_NameMustBeAtLeastOneCharLong = () => mc(this.ERROR_NameMustBeAtLeastOneCharLong, `The name parameter is required`);
|
|
488
509
|
static ERROR_NameMustBeAtMostNCharsLong = SevError | 0x0B5;
|
|
489
|
-
static Error_NameMustBeAtMostNCharsLong = (o) =>
|
|
510
|
+
static Error_NameMustBeAtMostNCharsLong = (o) => mc(this.ERROR_NameMustBeAtMostNCharsLong, `The referenced name '${def(o.p?.[0])}' must be at most ${def(o.p?.[1])} characters long`);
|
|
490
511
|
static ERROR_NameContainsInvalidCharacter = SevError | 0x0B6;
|
|
491
|
-
static Error_NameContainsInvalidCharacter = (o) =>
|
|
512
|
+
static Error_NameContainsInvalidCharacter = (o) => mc(this.ERROR_NameContainsInvalidCharacter, `The referenced name '${def(o.p?.[0])}' contains an invalid character`, `Names (or identifiers) must not contain spaces, commas, parentheses,
|
|
492
513
|
square brackets, control characters, or Unicode non-characters.`);
|
|
493
514
|
static ERROR_NameMustNotContainSpaces = SevError | 0x0B7;
|
|
494
|
-
static Error_NameMustNotContainSpaces = (o) =>
|
|
515
|
+
static Error_NameMustNotContainSpaces = (o) => mc(this.ERROR_NameMustNotContainSpaces, `The referenced name '${def(o.p?.[0])}' must not contain spaces`, `Names (or identifiers) must not contain spaces, commas, parentheses,
|
|
495
516
|
square brackets, control characters, or Unicode non-characters.`);
|
|
496
517
|
static ERROR_NameMustNotContainComma = SevError | 0x0B8;
|
|
497
|
-
static Error_NameMustNotContainComma = (o) =>
|
|
518
|
+
static Error_NameMustNotContainComma = (o) => mc(this.ERROR_NameMustNotContainComma, `The referenced name '${def(o.p?.[0])}' must not contain commas`, `Names (or identifiers) must not contain spaces, commas, parentheses,
|
|
498
519
|
square brackets, control characters, or Unicode non-characters.`);
|
|
499
520
|
static ERROR_NameMustNotContainParentheses = SevError | 0x0B9;
|
|
500
|
-
static Error_NameMustNotContainParentheses = (o) =>
|
|
521
|
+
static Error_NameMustNotContainParentheses = (o) => mc(this.ERROR_NameMustNotContainParentheses, `The referenced name '${def(o.p?.[0])}' must not contain opening or closing parentheses`, `Names (or identifiers) must not contain spaces, commas, parentheses,
|
|
501
522
|
square brackets, control characters, or Unicode non-characters.`);
|
|
502
523
|
static ERROR_NameMustNotContainSquareBrackets = SevError | 0x0BA;
|
|
503
|
-
static Error_NameMustNotContainSquareBrackets = (o) =>
|
|
524
|
+
static Error_NameMustNotContainSquareBrackets = (o) => mc(this.ERROR_NameMustNotContainSquareBrackets, `The referenced name '${def(o.p?.[0])}' must not contain opening or closing square brackets`, `Names (or identifiers) must not contain spaces, commas, parentheses,
|
|
504
525
|
square brackets, control characters, or Unicode non-characters.`);
|
|
526
|
+
static WARN_DeprecatedStatement = SevWarn | 0x0BB;
|
|
527
|
+
static Warn_DeprecatedStatement = (o) => mc(this.WARN_DeprecatedStatement, `The statement '${def(o.p?.[0])}' has been deprecated in Keyman ${def(o.p?.[1])}`);
|
|
505
528
|
static FATAL_BufferOverflow = SevFatal | 0x0C0;
|
|
506
|
-
static Fatal_BufferOverflow = () =>
|
|
529
|
+
static Fatal_BufferOverflow = () => mc(this.FATAL_BufferOverflow, `The compiler memory buffer overflowed`);
|
|
507
530
|
}
|
|
508
531
|
;
|
|
509
532
|
//# sourceMappingURL=kmn-compiler-messages.js.map
|
|
510
|
-
//# debugId=
|
|
533
|
+
//# debugId=e152753c-bec6-554f-a6d5-606ef41218c9
|