@keymanapp/kmc-kmn 18.0.41-alpha → 18.0.46-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.
Files changed (45) hide show
  1. package/build/src/compiler/compiler.d.ts +181 -181
  2. package/build/src/compiler/compiler.js +493 -496
  3. package/build/src/compiler/compiler.js.map +1 -1
  4. package/build/src/compiler/kmn-compiler-messages.d.ts +458 -458
  5. package/build/src/compiler/kmn-compiler-messages.d.ts.map +1 -1
  6. package/build/src/compiler/kmn-compiler-messages.js +459 -462
  7. package/build/src/compiler/kmn-compiler-messages.js.map +1 -1
  8. package/build/src/compiler/osk.d.ts +31 -31
  9. package/build/src/compiler/osk.js +84 -87
  10. package/build/src/compiler/osk.js.map +1 -1
  11. package/build/src/import/kmcmplib/wasm-host.d.ts +2 -2
  12. package/build/src/import/kmcmplib/wasm-host.js +3262 -3265
  13. package/build/src/import/kmcmplib/wasm-host.js.map +1 -1
  14. package/build/src/import/kmcmplib/wasm-host.wasm +0 -0
  15. package/build/src/kmw-compiler/compiler-globals.d.ts +19 -19
  16. package/build/src/kmw-compiler/compiler-globals.js +38 -41
  17. package/build/src/kmw-compiler/compiler-globals.js.map +1 -1
  18. package/build/src/kmw-compiler/constants.d.ts +16 -16
  19. package/build/src/kmw-compiler/constants.js +79 -82
  20. package/build/src/kmw-compiler/constants.js.map +1 -1
  21. package/build/src/kmw-compiler/javascript-strings.d.ts +32 -32
  22. package/build/src/kmw-compiler/javascript-strings.js +852 -855
  23. package/build/src/kmw-compiler/javascript-strings.js.map +1 -1
  24. package/build/src/kmw-compiler/keymanweb-key-codes.d.ts +22 -22
  25. package/build/src/kmw-compiler/keymanweb-key-codes.js +819 -822
  26. package/build/src/kmw-compiler/keymanweb-key-codes.js.map +1 -1
  27. package/build/src/kmw-compiler/kmw-compiler-messages.d.ts +30 -30
  28. package/build/src/kmw-compiler/kmw-compiler-messages.js +40 -43
  29. package/build/src/kmw-compiler/kmw-compiler-messages.js.map +1 -1
  30. package/build/src/kmw-compiler/kmw-compiler.d.ts +13 -13
  31. package/build/src/kmw-compiler/kmw-compiler.js +547 -550
  32. package/build/src/kmw-compiler/kmw-compiler.js.map +1 -1
  33. package/build/src/kmw-compiler/util.d.ts +74 -74
  34. package/build/src/kmw-compiler/util.js +247 -250
  35. package/build/src/kmw-compiler/util.js.map +1 -1
  36. package/build/src/kmw-compiler/validate-layout-file.d.ts +8 -8
  37. package/build/src/kmw-compiler/validate-layout-file.js +276 -279
  38. package/build/src/kmw-compiler/validate-layout-file.js.map +1 -1
  39. package/build/src/kmw-compiler/visual-keyboard-compiler.d.ts +2 -2
  40. package/build/src/kmw-compiler/visual-keyboard-compiler.js +119 -122
  41. package/build/src/kmw-compiler/visual-keyboard-compiler.js.map +1 -1
  42. package/build/src/main.d.ts +9 -9
  43. package/build/src/main.js +10 -13
  44. package/build/src/main.js.map +1 -1
  45. package/package.json +5 -5
@@ -1,499 +1,496 @@
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]="3a304788-7246-5673-839a-278ec31bac3d")}catch(e){}}();
3
- import { CompilerErrorNamespace, CompilerErrorSeverity, CompilerMessageSpec as m, CompilerMessageDef as def, CompilerMessageSpecWithException } from "@keymanapp/common-types";
4
- import { kmnfile } from "../kmw-compiler/compiler-globals.js";
5
- import { KeymanUrls } from "@keymanapp/developer-utils";
6
- const Namespace = CompilerErrorNamespace.KmnCompiler;
7
- const SevInfo = CompilerErrorSeverity.Info | Namespace;
8
- const SevHint = CompilerErrorSeverity.Hint | Namespace;
9
- const SevWarn = CompilerErrorSeverity.Warn | Namespace;
10
- const SevError = CompilerErrorSeverity.Error | Namespace;
11
- const SevFatal = CompilerErrorSeverity.Fatal | Namespace;
12
- // For messages from the KeymanWeb compiler, we need to construct our messages
13
- // slightly differently. This could be refactored in the future, as it is not
14
- // obvious which messages should use which function.
15
- const mw = (code, message, o) => ({
16
- ...m(code, message),
17
- filename: o?.filename ?? kmnfile,
18
- line: o?.line,
19
- });
20
- /**
21
- * LogLevel comes from kmn_compiler_errors.h, for legacy compiler error messages
22
- */
23
- var LogLevel;
24
- (function (LogLevel) {
25
- LogLevel[LogLevel["LEVEL_MASK"] = 61440] = "LEVEL_MASK";
26
- LogLevel[LogLevel["CODE_MASK"] = 4095] = "CODE_MASK";
27
- LogLevel[LogLevel["CERR_FATAL"] = 32768] = "CERR_FATAL";
28
- LogLevel[LogLevel["CERR_ERROR"] = 16384] = "CERR_ERROR";
29
- LogLevel[LogLevel["CERR_WARNING"] = 8192] = "CERR_WARNING";
30
- LogLevel[LogLevel["CERR_HINT"] = 4096] = "CERR_HINT";
31
- LogLevel[LogLevel["CERR_INFO"] = 0] = "CERR_INFO";
32
- })(LogLevel || (LogLevel = {}));
33
- ;
34
- /**
35
- * Translate the legacy compiler error messages to Severity codes
36
- */
37
- const LogLevelToSeverity = {
38
- [32768 /* LogLevel.CERR_FATAL */]: SevFatal,
39
- [16384 /* LogLevel.CERR_ERROR */]: SevError,
40
- [8192 /* LogLevel.CERR_WARNING */]: SevWarn,
41
- [4096 /* LogLevel.CERR_HINT */]: SevHint,
42
- [0 /* LogLevel.CERR_INFO */]: SevInfo
43
- };
44
- export var KmnCompilerMessageRanges;
45
- (function (KmnCompilerMessageRanges) {
46
- KmnCompilerMessageRanges[KmnCompilerMessageRanges["RANGE_KMN_COMPILER_MIN"] = 1] = "RANGE_KMN_COMPILER_MIN";
47
- KmnCompilerMessageRanges[KmnCompilerMessageRanges["RANGE_KMN_COMPILER_MAX"] = 2047] = "RANGE_KMN_COMPILER_MAX";
48
- KmnCompilerMessageRanges[KmnCompilerMessageRanges["RANGE_LEXICAL_MODEL_MIN"] = 2048] = "RANGE_LEXICAL_MODEL_MIN";
49
- KmnCompilerMessageRanges[KmnCompilerMessageRanges["RANGE_LEXICAL_MODEL_MAX"] = 2303] = "RANGE_LEXICAL_MODEL_MAX";
50
- KmnCompilerMessageRanges[KmnCompilerMessageRanges["RANGE_CompilerMessage_Min"] = 2304] = "RANGE_CompilerMessage_Min";
51
- KmnCompilerMessageRanges[KmnCompilerMessageRanges["RANGE_CompilerMessage_Max"] = 4095] = "RANGE_CompilerMessage_Max";
52
- })(KmnCompilerMessageRanges || (KmnCompilerMessageRanges = {}));
53
- /**
54
- * @internal
55
- *
56
- * Error messages reported by the .kmn compiler. The error codes in this class
57
- * share an address space with messages from kmn_compiler_errors.h, which are
58
- * generated by kmcmplib, so codes below 0x900 are reserved for kmcmplib
59
- * messages.
60
- *
61
- * The second half of this class defines the messages from kmcmplib. These
62
- * messages should correspond to codes in kmn_compiler_errors.h, exclusive
63
- * severity bits. Message text is defined by kmcmplib and passed through a
64
- * callback at this time. The message text presented here is currently unused
65
- * during the compilation process, but is used in the `kmc messages` tool and
66
- * for documentation.
67
- *
68
- * `CERR_` messages that are actually fatals have been renamed to `FATAL_`.
69
- *
70
- * @example
71
- *
72
- * ```
73
- * kmcmplib.CERR_BadCallParams = CERR_FATAL | 0x002 = 0x8002
74
- * ERROR_BadCallParams = SevError | 0x0002 = 0x300000 | 0x2000 | 0x002 = 0x302002
75
- * ```
76
- */
77
- export class KmnCompilerMessages {
78
- // TODO: v18.0 we should consider moving error message generation in kmcmplib to
79
- // kmc-kmn, which would avoid a number of legacy issues. Questions about
80
- // parameterisation.
81
- static FATAL_UnexpectedException = SevFatal | 0x900;
1
+ import { CompilerErrorNamespace, CompilerErrorSeverity, CompilerMessageSpec as m, CompilerMessageDef as def, CompilerMessageSpecWithException } from "@keymanapp/common-types";
2
+ import { kmnfile } from "../kmw-compiler/compiler-globals.js";
3
+ import { KeymanUrls } from "@keymanapp/developer-utils";
4
+ const Namespace = CompilerErrorNamespace.KmnCompiler;
5
+ const SevInfo = CompilerErrorSeverity.Info | Namespace;
6
+ const SevHint = CompilerErrorSeverity.Hint | Namespace;
7
+ const SevWarn = CompilerErrorSeverity.Warn | Namespace;
8
+ const SevError = CompilerErrorSeverity.Error | Namespace;
9
+ const SevFatal = CompilerErrorSeverity.Fatal | Namespace;
10
+ // For messages from the KeymanWeb compiler, we need to construct our messages
11
+ // slightly differently. This could be refactored in the future, as it is not
12
+ // obvious which messages should use which function.
13
+ const mw = (code, message, o) => ({
14
+ ...m(code, message),
15
+ filename: o?.filename ?? kmnfile,
16
+ line: o?.line,
17
+ });
18
+ /**
19
+ * LogLevel comes from kmn_compiler_errors.h, for legacy compiler error messages
20
+ */
21
+ var LogLevel;
22
+ (function (LogLevel) {
23
+ LogLevel[LogLevel["LEVEL_MASK"] = 61440] = "LEVEL_MASK";
24
+ LogLevel[LogLevel["CODE_MASK"] = 4095] = "CODE_MASK";
25
+ LogLevel[LogLevel["CERR_FATAL"] = 32768] = "CERR_FATAL";
26
+ LogLevel[LogLevel["CERR_ERROR"] = 16384] = "CERR_ERROR";
27
+ LogLevel[LogLevel["CERR_WARNING"] = 8192] = "CERR_WARNING";
28
+ LogLevel[LogLevel["CERR_HINT"] = 4096] = "CERR_HINT";
29
+ LogLevel[LogLevel["CERR_INFO"] = 0] = "CERR_INFO";
30
+ })(LogLevel || (LogLevel = {}));
31
+ ;
32
+ /**
33
+ * Translate the legacy compiler error messages to Severity codes
34
+ */
35
+ const LogLevelToSeverity = {
36
+ [32768 /* LogLevel.CERR_FATAL */]: SevFatal,
37
+ [16384 /* LogLevel.CERR_ERROR */]: SevError,
38
+ [8192 /* LogLevel.CERR_WARNING */]: SevWarn,
39
+ [4096 /* LogLevel.CERR_HINT */]: SevHint,
40
+ [0 /* LogLevel.CERR_INFO */]: SevInfo
41
+ };
42
+ export var KmnCompilerMessageRanges;
43
+ (function (KmnCompilerMessageRanges) {
44
+ KmnCompilerMessageRanges[KmnCompilerMessageRanges["RANGE_KMN_COMPILER_MIN"] = 1] = "RANGE_KMN_COMPILER_MIN";
45
+ KmnCompilerMessageRanges[KmnCompilerMessageRanges["RANGE_KMN_COMPILER_MAX"] = 2047] = "RANGE_KMN_COMPILER_MAX";
46
+ KmnCompilerMessageRanges[KmnCompilerMessageRanges["RANGE_LEXICAL_MODEL_MIN"] = 2048] = "RANGE_LEXICAL_MODEL_MIN";
47
+ KmnCompilerMessageRanges[KmnCompilerMessageRanges["RANGE_LEXICAL_MODEL_MAX"] = 2303] = "RANGE_LEXICAL_MODEL_MAX";
48
+ KmnCompilerMessageRanges[KmnCompilerMessageRanges["RANGE_CompilerMessage_Min"] = 2304] = "RANGE_CompilerMessage_Min";
49
+ KmnCompilerMessageRanges[KmnCompilerMessageRanges["RANGE_CompilerMessage_Max"] = 4095] = "RANGE_CompilerMessage_Max";
50
+ })(KmnCompilerMessageRanges || (KmnCompilerMessageRanges = {}));
51
+ /**
52
+ * @internal
53
+ *
54
+ * Error messages reported by the .kmn compiler. The error codes in this class
55
+ * share an address space with messages from kmn_compiler_errors.h, which are
56
+ * generated by kmcmplib, so codes below 0x900 are reserved for kmcmplib
57
+ * messages.
58
+ *
59
+ * The second half of this class defines the messages from kmcmplib. These
60
+ * messages should correspond to codes in kmn_compiler_errors.h, exclusive
61
+ * severity bits. Message text is defined by kmcmplib and passed through a
62
+ * callback at this time. The message text presented here is currently unused
63
+ * during the compilation process, but is used in the `kmc messages` tool and
64
+ * for documentation.
65
+ *
66
+ * `CERR_` messages that are actually fatals have been renamed to `FATAL_`.
67
+ *
68
+ * @example
69
+ *
70
+ * ```
71
+ * kmcmplib.CERR_BadCallParams = CERR_FATAL | 0x002 = 0x8002
72
+ * ERROR_BadCallParams = SevError | 0x0002 = 0x300000 | 0x2000 | 0x002 = 0x302002
73
+ * ```
74
+ */
75
+ export class KmnCompilerMessages {
76
+ // TODO: v18.0 we should consider moving error message generation in kmcmplib to
77
+ // kmc-kmn, which would avoid a number of legacy issues. Questions about
78
+ // parameterisation.
79
+ static FATAL_UnexpectedException = SevFatal | 0x900;
82
80
  static Fatal_UnexpectedException = (o) => CompilerMessageSpecWithException(this.FATAL_UnexpectedException, null, o.e ?? 'unknown error', `Raised when KmnCompiler or one of its components has an internal
83
81
  error. If you experience this error, it should be reported to the Keyman
84
- team for resolution via ${KeymanUrls.NEW_KEYMAN_ISSUE()}.`);
85
- static FATAL_MissingWasmModule = SevFatal | 0x901;
82
+ team for resolution via ${KeymanUrls.NEW_KEYMAN_ISSUE()}.`);
83
+ static FATAL_MissingWasmModule = SevFatal | 0x901;
86
84
  static Fatal_MissingWasmModule = (o) => CompilerMessageSpecWithException(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
87
85
  a configuration or dependency issue. Make sure you are running a Javascript
88
- engine that supports WASM, and that use of WASM is enabled.`);
89
- // Note: this is now unused
90
- // static FATAL_UnableToSetCompilerOptions = SevFatal | 0x902;
91
- // static Fatal_UnableToSetCompilerOptions = () => m(this.FATAL_UnableToSetCompilerOptions, null, `Unable to set compiler options`);
92
- static FATAL_CallbacksNotSet = SevFatal | 0x903;
86
+ engine that supports WASM, and that use of WASM is enabled.`);
87
+ // Note: this is now unused
88
+ // static FATAL_UnableToSetCompilerOptions = SevFatal | 0x902;
89
+ // static Fatal_UnableToSetCompilerOptions = () => m(this.FATAL_UnableToSetCompilerOptions, null, `Unable to set compiler options`);
90
+ static FATAL_CallbacksNotSet = SevFatal | 0x903;
93
91
  static Fatal_CallbacksNotSet = () => CompilerMessageSpecWithException(this.FATAL_CallbacksNotSet, null, `Callbacks were not set with init`, `Raised when KmnCompiler or one of its components experiences an internal
94
92
  error. If you experience this error, it should be reported to the Keyman
95
- team for resolution via ${KeymanUrls.NEW_KEYMAN_ISSUE()}.`);
96
- static FATAL_UnicodeSetOutOfRange = SevFatal | 0x904;
93
+ team for resolution via ${KeymanUrls.NEW_KEYMAN_ISSUE()}.`);
94
+ static FATAL_UnicodeSetOutOfRange = SevFatal | 0x904;
97
95
  static Fatal_UnicodeSetOutOfRange = () => CompilerMessageSpecWithException(this.FATAL_UnicodeSetOutOfRange, null, `UnicodeSet buffer was too small`, `Raised when caller to UnicodeSet functions provides an invalid buffer. If
98
96
  you experience this error, it should be reported to the Keyman team for
99
- resolution via ${KeymanUrls.NEW_KEYMAN_ISSUE()}.`);
100
- // TODO: rename the following functions to Error_UsetHasStrings etc
101
- static ERROR_UnicodeSetHasStrings = SevError | 0x905;
97
+ resolution via ${KeymanUrls.NEW_KEYMAN_ISSUE()}.`);
98
+ // TODO: rename the following functions to Error_UsetHasStrings etc
99
+ static ERROR_UnicodeSetHasStrings = SevError | 0x905;
102
100
  static Error_UnicodeSetHasStrings = () => m(this.ERROR_UnicodeSetHasStrings, `uset contains strings, not allowed`, `The provided uset uses multi-character strings, (\`{}\` notation, e.g.
103
101
  \`[żġħ{ie}{għ}]\`. ). Although full UnicodeSets support strings, LDML
104
102
  keyboards do not support multi-character strings in usets. To resolve this,
105
103
  reformat the uset to avoid the use of multi-character strings.
106
104
 
107
- More on uset: ${KeymanUrls.LDML_SPEC('element-uset')}`);
108
- static ERROR_UnicodeSetHasProperties = SevError | 0x906;
105
+ More on uset: ${KeymanUrls.LDML_SPEC('element-uset')}`);
106
+ static ERROR_UnicodeSetHasProperties = SevError | 0x906;
109
107
  static Error_UnicodeSetHasProperties = () => m(this.ERROR_UnicodeSetHasProperties, `uset contains properties, not allowed`, `The provided uset uses property notation (\`\\p{…}\` or \`[:…:]\`). LDML
110
108
  keyboards do not support Unicode properties in usets, because that would
111
109
  make implementations dependent on a particular version of Unicode. To
112
110
  resolve this, reformat the uset to avoid the use of properties.
113
111
 
114
- More on uset: ${KeymanUrls.LDML_SPEC('element-uset')}`);
115
- static ERROR_UnicodeSetSyntaxError = SevError | 0x907;
112
+ More on uset: ${KeymanUrls.LDML_SPEC('element-uset')}`);
113
+ static ERROR_UnicodeSetSyntaxError = SevError | 0x907;
116
114
  static Error_UnicodeSetSyntaxError = () => m(this.ERROR_UnicodeSetSyntaxError, `uset had a Syntax Error while parsing`, `The provided uset has a syntax error and could not be parsed. Verify the
117
115
  format of the uset against the specification.
118
116
 
119
- More on uset: ${KeymanUrls.LDML_SPEC('element-uset')}`);
120
- static ERROR_InvalidKvksFile = SevError | 0x908;
121
- static Error_InvalidKvksFile = (o) => m(this.ERROR_InvalidKvksFile, `Error encountered parsing ${def(o.filename)}: ${o.e ?? 'unknown error'}`, // Note, not fatal, not reporting to Sentry
117
+ More on uset: ${KeymanUrls.LDML_SPEC('element-uset')}`);
118
+ static ERROR_InvalidKvksFile = SevError | 0x908;
119
+ static Error_InvalidKvksFile = (o) => m(this.ERROR_InvalidKvksFile, `Error encountered parsing ${def(o.filename)}: ${o.e ?? 'unknown error'}`, // Note, not fatal, not reporting to Sentry
122
120
  `The .kvks file could not be parsed because it was not a valid XML file.
123
121
  There may be additional information in the error message to help you
124
122
  resolve the error.
125
123
 
126
- More on .kvks file format: ${KeymanUrls.FILE_TYPE('kvks')}`);
127
- static WARN_InvalidVkeyInKvksFile = SevWarn | 0x909;
124
+ More on .kvks file format: ${KeymanUrls.FILE_TYPE('kvks')}`);
125
+ static WARN_InvalidVkeyInKvksFile = SevWarn | 0x909;
128
126
  static Warn_InvalidVkeyInKvksFile = (o) => m(this.WARN_InvalidVkeyInKvksFile, `Invalid virtual key ${def(o.invalidVkey)} found in ${def(o.filename)}`, `The .kvks file contained a virtual key that was not supported by
129
127
  Keyman. Remove this virtual key from the .kvks file.
130
128
 
131
- Supported virtual keys: ${KeymanUrls.VIRTUAL_KEYS()}`);
132
- static ERROR_InvalidDisplayMapFile = SevError | 0x90A;
133
- static Error_InvalidDisplayMapFile = (o) => m(this.ERROR_InvalidDisplayMapFile, `Error encountered parsing display map ${def(o.filename)}: ${o.e ?? 'unknown error'}`, // Note, not fatal, not reporting to Sentry
129
+ Supported virtual keys: ${KeymanUrls.VIRTUAL_KEYS()}`);
130
+ static ERROR_InvalidDisplayMapFile = SevError | 0x90A;
131
+ static Error_InvalidDisplayMapFile = (o) => m(this.ERROR_InvalidDisplayMapFile, `Error encountered parsing display map ${def(o.filename)}: ${o.e ?? 'unknown error'}`, // Note, not fatal, not reporting to Sentry
134
132
  `The displayMap file could not be parsed because it was not a valid JSON
135
133
  file. There may be additional information in the error message to help you
136
134
  resolve the error.
137
135
 
138
- More on displayMap: ${KeymanUrls.KMN_REF('displaymap')}`);
139
- static ERROR_InvalidKvkFile = SevError | 0x90B;
140
- static Error_InvalidKvkFile = (o) => m(this.ERROR_InvalidKvkFile, `Error encountered loading ${def(o.filename)}: ${o.e ?? 'unknown error'}`, // Note, not fatal, not reporting to Sentry
136
+ More on displayMap: ${KeymanUrls.KMN_REF('displaymap')}`);
137
+ static ERROR_InvalidKvkFile = SevError | 0x90B;
138
+ static Error_InvalidKvkFile = (o) => m(this.ERROR_InvalidKvkFile, `Error encountered loading ${def(o.filename)}: ${o.e ?? 'unknown error'}`, // Note, not fatal, not reporting to Sentry
141
139
  `The .kvk file could not be loaded because it was not a valid format. There
142
140
  may be additional information in the error message to help you resolve the
143
141
  error.
144
142
 
145
- More on .kvk files: ${KeymanUrls.FILE_TYPE('kvk')}`);
146
- static ERROR_FileNotFound = SevError | 0x90C;
143
+ More on .kvk files: ${KeymanUrls.FILE_TYPE('kvk')}`);
144
+ static ERROR_FileNotFound = SevError | 0x90C;
147
145
  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
148
- to the file.`);
149
- // static INFO_None = SevInfo | 0x000;
150
- static INFO_EndOfFile = SevInfo | 0x001;
151
- static Info_EndOfFile = () => m(this.INFO_EndOfFile, `(no error - reserved code)`);
152
- static FATAL_BadCallParams = SevFatal | 0x002;
153
- static Fatal_BadCallParams = () => m(this.FATAL_BadCallParams, `CompileKeyboardFile was called with bad parameters`);
154
- static FATAL_CannotAllocateMemory = SevFatal | 0x004;
155
- static Fatal_CannotAllocateMemory = () => m(this.FATAL_CannotAllocateMemory, `Out of memory`);
156
- static ERROR_InfileNotExist = SevError | 0x005; // #10678: reduced from fatal to error in 17.0
157
- static Error_InfileNotExist = () => m(this.ERROR_InfileNotExist, `Cannot find the input file`);
158
- // static ERROR_CannotCreateOutfile = SevError | 0x006; // #10678: reduced from fatal to error in 17.0, but unused
159
- // static Error_CannotCreateOutfile = () => m(this.ERROR_CannotCreateOutfile, `Cannot open output file for writing`); unused
160
- static FATAL_UnableToWriteFully = SevFatal | 0x007;
161
- static Fatal_UnableToWriteFully = () => m(this.FATAL_UnableToWriteFully, `Unable to write the file completely`);
162
- static ERROR_CannotReadInfile = SevError | 0x008; // #10678: reduced from fatal to error in 17.0
163
- static Error_CannotReadInfile = () => m(this.ERROR_CannotReadInfile, `Cannot read the input file`);
164
- static FATAL_SomewhereIGotItWrong = SevFatal | 0x009;
165
- static Fatal_SomewhereIGotItWrong = () => m(this.FATAL_SomewhereIGotItWrong, `Internal error: contact Keyman`);
166
- static ERROR_InvalidToken = SevError | 0x00A;
167
- static Error_InvalidToken = () => m(this.ERROR_InvalidToken, `Invalid token found`);
168
- // kmcmplib: static Error_InvalidBegin = () => m(this.ERROR_InvalidBegin, `Invalid 'begin' command`);
169
- static ERROR_InvalidBegin = SevError | 0x00B;
170
- static Error_InvalidBegin = () => mw(this.ERROR_InvalidBegin, `A "begin unicode" statement is required to compile a KeymanWeb keyboard`);
171
- static ERROR_InvalidName = SevError | 0x00C;
172
- static Error_InvalidName = () => m(this.ERROR_InvalidName, `Invalid 'name' command`);
173
- static ERROR_InvalidVersion = SevError | 0x00D;
174
- static Error_InvalidVersion = () => m(this.ERROR_InvalidVersion, `Invalid 'version' command`);
175
- static ERROR_InvalidLanguageLine = SevError | 0x00E;
176
- static Error_InvalidLanguageLine = () => m(this.ERROR_InvalidLanguageLine, `Invalid 'language' command`);
177
- static ERROR_LayoutButNoLanguage = SevError | 0x00F;
178
- static Error_LayoutButNoLanguage = () => m(this.ERROR_LayoutButNoLanguage, `Layout command found but no language command`);
179
- static ERROR_InvalidLayoutLine = SevError | 0x010;
180
- static Error_InvalidLayoutLine = () => m(this.ERROR_InvalidLayoutLine, `Invalid 'layout' command`);
181
- static ERROR_NoVersionLine = SevError | 0x011;
182
- static Error_NoVersionLine = () => m(this.ERROR_NoVersionLine, `No version line found for file`);
183
- static ERROR_InvalidGroupLine = SevError | 0x012;
184
- static Error_InvalidGroupLine = () => m(this.ERROR_InvalidGroupLine, `Invalid 'group' command`);
185
- static ERROR_InvalidStoreLine = SevError | 0x013;
186
- static Error_InvalidStoreLine = () => m(this.ERROR_InvalidStoreLine, `Invalid 'store' command`);
187
- static ERROR_InvalidCodeInKeyPartOfRule = SevError | 0x014;
188
- static Error_InvalidCodeInKeyPartOfRule = () => m(this.ERROR_InvalidCodeInKeyPartOfRule, `Invalid command or code found in key part of rule`);
189
- static ERROR_InvalidDeadkey = SevError | 0x015;
190
- static Error_InvalidDeadkey = () => m(this.ERROR_InvalidDeadkey, `Invalid 'deadkey' or 'dk' command`);
191
- static ERROR_InvalidValue = SevError | 0x016;
192
- static Error_InvalidValue = () => m(this.ERROR_InvalidValue, `Invalid value in extended string`);
193
- static ERROR_ZeroLengthString = SevError | 0x017;
194
- static Error_ZeroLengthString = () => m(this.ERROR_ZeroLengthString, `A string of zero characters was found`);
195
- static ERROR_TooManyIndexToKeyRefs = SevError | 0x018;
196
- static Error_TooManyIndexToKeyRefs = () => m(this.ERROR_TooManyIndexToKeyRefs, `Too many index commands refering to key string`);
197
- static ERROR_UnterminatedString = SevError | 0x019;
198
- static Error_UnterminatedString = () => m(this.ERROR_UnterminatedString, `Unterminated string in line`);
199
- static ERROR_StringInVirtualKeySection = SevError | 0x01A;
200
- static Error_StringInVirtualKeySection = () => m(this.ERROR_StringInVirtualKeySection, `extend string illegal in virtual key section`);
201
- static ERROR_AnyInVirtualKeySection = SevError | 0x01B;
202
- static Error_AnyInVirtualKeySection = () => m(this.ERROR_AnyInVirtualKeySection, `'any' command is illegal in virtual key section`);
203
- static ERROR_InvalidAny = SevError | 0x01C;
204
- static Error_InvalidAny = () => m(this.ERROR_InvalidAny, `Invalid 'any' command`);
205
- static ERROR_StoreDoesNotExist = SevError | 0x01D;
206
- static Error_StoreDoesNotExist = () => m(this.ERROR_StoreDoesNotExist, `Store referenced does not exist`);
207
- static ERROR_BeepInVirtualKeySection = SevError | 0x01E;
208
- static Error_BeepInVirtualKeySection = () => m(this.ERROR_BeepInVirtualKeySection, `'beep' command is illegal in virtual key section`);
209
- static ERROR_IndexInVirtualKeySection = SevError | 0x01F;
210
- static Error_IndexInVirtualKeySection = () => m(this.ERROR_IndexInVirtualKeySection, `'index' command is illegal in virtual key section`);
211
- static ERROR_InvalidIndex = SevError | 0x020;
212
- static Error_InvalidIndex = () => m(this.ERROR_InvalidIndex, `Invalid 'index' command`);
213
- static ERROR_OutsInVirtualKeySection = SevError | 0x021;
214
- static Error_OutsInVirtualKeySection = () => m(this.ERROR_OutsInVirtualKeySection, `'outs' command is illegal in virtual key section`);
215
- static ERROR_InvalidOuts = SevError | 0x022;
216
- static Error_InvalidOuts = () => m(this.ERROR_InvalidOuts, `Invalid 'outs' command`);
217
- static ERROR_ContextInVirtualKeySection = SevError | 0x024;
218
- static Error_ContextInVirtualKeySection = () => m(this.ERROR_ContextInVirtualKeySection, `'context' command is illegal in virtual key section`);
219
- static ERROR_InvalidUse = SevError | 0x025;
220
- static Error_InvalidUse = () => m(this.ERROR_InvalidUse, `Invalid 'use' command`);
221
- static ERROR_GroupDoesNotExist = SevError | 0x026;
222
- static Error_GroupDoesNotExist = () => m(this.ERROR_GroupDoesNotExist, `Group does not exist`);
223
- static ERROR_VirtualKeyNotAllowedHere = SevError | 0x027;
224
- static Error_VirtualKeyNotAllowedHere = () => m(this.ERROR_VirtualKeyNotAllowedHere, `Virtual key is not allowed here`);
225
- static ERROR_InvalidSwitch = SevError | 0x028;
226
- static Error_InvalidSwitch = () => m(this.ERROR_InvalidSwitch, `Invalid 'switch' command`);
227
- static ERROR_NoTokensFound = SevError | 0x029;
228
- static Error_NoTokensFound = () => m(this.ERROR_NoTokensFound, `No tokens found in line`);
229
- static ERROR_InvalidLineContinuation = SevError | 0x02A;
230
- static Error_InvalidLineContinuation = () => m(this.ERROR_InvalidLineContinuation, `Invalid line continuation`);
231
- static ERROR_LineTooLong = SevError | 0x02B;
232
- static Error_LineTooLong = () => m(this.ERROR_LineTooLong, `Line too long`);
233
- static ERROR_InvalidCopyright = SevError | 0x02C;
234
- static Error_InvalidCopyright = () => m(this.ERROR_InvalidCopyright, `Invalid 'copyright' command`);
235
- static ERROR_CodeInvalidInThisSection = SevError | 0x02D;
236
- static Error_CodeInvalidInThisSection = () => m(this.ERROR_CodeInvalidInThisSection, `This line is invalid in this section of the file`);
237
- static ERROR_InvalidMessage = SevError | 0x02E;
238
- static Error_InvalidMessage = () => m(this.ERROR_InvalidMessage, `Invalid 'message' command`);
239
- static ERROR_InvalidLanguageName = SevError | 0x02F;
240
- static Error_InvalidLanguageName = () => m(this.ERROR_InvalidLanguageName, `Invalid 'languagename' command`);
241
- static ERROR_InvalidBitmapLine = SevError | 0x030;
242
- static Error_InvalidBitmapLine = () => m(this.ERROR_InvalidBitmapLine, `Invalid 'bitmaps' command`);
243
- static ERROR_CannotReadBitmapFile = SevError | 0x031;
244
- static Error_CannotReadBitmapFile = () => m(this.ERROR_CannotReadBitmapFile, `Cannot open the bitmap or icon file for reading`);
245
- static ERROR_IndexDoesNotPointToAny = SevError | 0x032;
246
- static Error_IndexDoesNotPointToAny = () => m(this.ERROR_IndexDoesNotPointToAny, `An index() in the output does not have a corresponding any() statement`);
247
- static ERROR_ReservedCharacter = SevError | 0x033;
248
- static Error_ReservedCharacter = () => m(this.ERROR_ReservedCharacter, `A reserved character was found`);
249
- static ERROR_InvalidCharacter = SevError | 0x034;
250
- static Error_InvalidCharacter = () => m(this.ERROR_InvalidCharacter, `A character was found that is outside the valid Unicode range (U+0000 - U+10FFFF)`);
251
- static ERROR_InvalidCall = SevError | 0x035;
252
- static Error_InvalidCall = () => m(this.ERROR_InvalidCall, `The 'call' command is invalid`);
253
- static ERROR_CallInVirtualKeySection = SevError | 0x036;
254
- static Error_CallInVirtualKeySection = () => m(this.ERROR_CallInVirtualKeySection, `'call' command is illegal in virtual key section`);
255
- static ERROR_CodeInvalidInKeyStore = SevError | 0x037;
256
- static Error_CodeInvalidInKeyStore = () => m(this.ERROR_CodeInvalidInKeyStore, `The command is invalid inside a store that is used in a key part of the rule`);
257
- static ERROR_CannotLoadIncludeFile = SevError | 0x038;
258
- static Error_CannotLoadIncludeFile = () => m(this.ERROR_CannotLoadIncludeFile, `Cannot load the included file: it is either invalid or does not exist`);
259
- static ERROR_60FeatureOnly_EthnologueCode = SevError | 0x039;
260
- static Error_60FeatureOnly_EthnologueCode = () => m(this.ERROR_60FeatureOnly_EthnologueCode, `EthnologueCode system store requires VERSION 6.0 or higher`);
261
- static ERROR_60FeatureOnly_MnemonicLayout = SevError | 0x03A;
262
- static Error_60FeatureOnly_MnemonicLayout = () => m(this.ERROR_60FeatureOnly_MnemonicLayout, `MnemonicLayout functionality requires VERSION 6.0 or higher`);
263
- static ERROR_60FeatureOnly_OldCharPosMatching = SevError | 0x03B;
264
- static Error_60FeatureOnly_OldCharPosMatching = () => m(this.ERROR_60FeatureOnly_OldCharPosMatching, `OldCharPosMatching system store requires VERSION 6.0 or higher`);
265
- static ERROR_60FeatureOnly_NamedCodes = SevError | 0x03C;
266
- static Error_60FeatureOnly_NamedCodes = () => m(this.ERROR_60FeatureOnly_NamedCodes, `Named character constants requires VERSION 6.0 or higher`);
267
- static ERROR_60FeatureOnly_Contextn = SevError | 0x03D;
268
- static Error_60FeatureOnly_Contextn = () => m(this.ERROR_60FeatureOnly_Contextn, `Context(n) requires VERSION 6.0 or higher`);
269
- static ERROR_501FeatureOnly_Call = SevError | 0x03E;
270
- static Error_501FeatureOnly_Call = () => m(this.ERROR_501FeatureOnly_Call, `Call() requires VERSION 5.01 or higher`);
271
- static ERROR_InvalidNamedCode = SevError | 0x03F;
272
- static Error_InvalidNamedCode = () => m(this.ERROR_InvalidNamedCode, `Invalid named code constant`);
273
- static ERROR_InvalidSystemStore = SevError | 0x040;
274
- static Error_InvalidSystemStore = () => m(this.ERROR_InvalidSystemStore, `Invalid system store name found`);
275
- static ERROR_60FeatureOnly_VirtualCharKey = SevError | 0x044;
276
- static Error_60FeatureOnly_VirtualCharKey = () => m(this.ERROR_60FeatureOnly_VirtualCharKey, `Virtual character keys require VERSION 6.0 or higher`);
277
- static ERROR_VersionAlreadyIncluded = SevError | 0x045;
278
- static Error_VersionAlreadyIncluded = () => m(this.ERROR_VersionAlreadyIncluded, `Only one VERSION or store(version) line allowed in a source file.`);
279
- static ERROR_70FeatureOnly = SevError | 0x046;
280
- static Error_70FeatureOnly = () => m(this.ERROR_70FeatureOnly, `This feature requires store(version) '7.0' or higher`);
281
- static ERROR_80FeatureOnly = SevError | 0x047;
282
- static Error_80FeatureOnly = () => m(this.ERROR_80FeatureOnly, `This feature requires store(version) '8.0' or higher`);
283
- static ERROR_InvalidInVirtualKeySection = SevError | 0x048;
284
- static Error_InvalidInVirtualKeySection = () => m(this.ERROR_InvalidInVirtualKeySection, `This statement is not valid in a virtual key section`);
285
- static ERROR_InvalidIf = SevError | 0x049;
286
- static Error_InvalidIf = () => m(this.ERROR_InvalidIf, `The if() statement is not valid`);
287
- static ERROR_InvalidReset = SevError | 0x04A;
288
- static Error_InvalidReset = () => m(this.ERROR_InvalidReset, `The reset() statement is not valid`);
289
- static ERROR_InvalidSet = SevError | 0x04B;
290
- static Error_InvalidSet = () => m(this.ERROR_InvalidSet, `The set() statement is not valid`);
291
- static ERROR_InvalidSave = SevError | 0x04C;
292
- static Error_InvalidSave = () => m(this.ERROR_InvalidSave, `The save() statement is not valid`);
293
- static ERROR_InvalidEthnologueCode = SevError | 0x04D;
294
- static Error_InvalidEthnologueCode = () => m(this.ERROR_InvalidEthnologueCode, `Invalid ethnologuecode format`);
295
- static FATAL_CannotCreateTempfile = SevFatal | 0x04E;
296
- static Fatal_CannotCreateTempfile = () => m(this.FATAL_CannotCreateTempfile, `Cannot create temp file`);
297
- static ERROR_90FeatureOnly_IfSystemStores = SevError | 0x04F;
298
- static Error_90FeatureOnly_IfSystemStores = () => m(this.ERROR_90FeatureOnly_IfSystemStores, `if(store) requires store(version) '9.0' or higher`);
299
- static ERROR_IfSystemStore_NotFound = SevError | 0x050;
300
- static Error_IfSystemStore_NotFound = () => m(this.ERROR_IfSystemStore_NotFound, `System store in if() not found`);
301
- static ERROR_90FeatureOnly_SetSystemStores = SevError | 0x051;
302
- static Error_90FeatureOnly_SetSystemStores = () => m(this.ERROR_90FeatureOnly_SetSystemStores, `set(store) requires store(version) '9.0' or higher`);
303
- static ERROR_SetSystemStore_NotFound = SevError | 0x052;
304
- static Error_SetSystemStore_NotFound = () => m(this.ERROR_SetSystemStore_NotFound, `System store in set() not found`);
305
- static ERROR_90FeatureOnlyVirtualKeyDictionary = SevError | 0x053;
306
- static Error_90FeatureOnlyVirtualKeyDictionary = () => m(this.ERROR_90FeatureOnlyVirtualKeyDictionary, `Custom virtual key names require store(version) '9.0'`);
307
- static ERROR_NotSupportedInKeymanWebContext = SevError | 0x054;
308
- static Error_NotSupportedInKeymanWebContext = (o) => mw(this.ERROR_NotSupportedInKeymanWebContext, `Statement '${def(o.code)}' is not currently supported in context for web and touch targets`, o);
309
- static ERROR_NotSupportedInKeymanWebOutput = SevError | 0x055;
310
- static Error_NotSupportedInKeymanWebOutput = (o) => mw(this.ERROR_NotSupportedInKeymanWebOutput, `Statement '${def(o.code)}' is not currently supported in output for web and touch targets`, o);
311
- static ERROR_NotSupportedInKeymanWebStore = SevError | 0x056;
312
- static Error_NotSupportedInKeymanWebStore = (o) => mw(this.ERROR_NotSupportedInKeymanWebStore, `'${def(o.code)}' is not currently supported in store '${def(o.store)}' when used by any or index for web and touch targets`);
313
- static ERROR_VirtualCharacterKeysNotSupportedInKeymanWeb = SevError | 0x057;
314
- static Error_VirtualCharacterKeysNotSupportedInKeymanWeb = (o) => mw(this.ERROR_VirtualCharacterKeysNotSupportedInKeymanWeb, `Virtual character keys not currently supported in KeymanWeb`, o);
315
- static ERROR_VirtualKeysNotValidForMnemonicLayouts = SevError | 0x058;
316
- static Error_VirtualKeysNotValidForMnemonicLayouts = (o) => mw(this.ERROR_VirtualKeysNotValidForMnemonicLayouts, `Virtual keys are not valid for mnemonic layouts`, o);
317
- static ERROR_InvalidTouchLayoutFile = SevError | 0x059;
318
- static Error_InvalidTouchLayoutFile = (o) => mw(this.ERROR_InvalidTouchLayoutFile, `Touch layout file ${def(o.filename)} is not valid`);
319
- static ERROR_TouchLayoutInvalidIdentifier = SevError | 0x05A;
320
- static Error_TouchLayoutInvalidIdentifier = (o) => mw(this.ERROR_TouchLayoutInvalidIdentifier, `Key "${def(o.keyId)}" on "${def(o.platformName)}", layer "${def(o.layerId)}" has an invalid identifier.`);
321
- static ERROR_InvalidKeyCode = SevError | 0x05B;
322
- static Error_InvalidKeyCode = (o) => mw(this.ERROR_InvalidKeyCode, `Invalid key identifier "${def(o.keyId)}"`);
323
- static ERROR_90FeatureOnlyLayoutFile = SevError | 0x05C;
324
- static Error_90FeatureOnlyLayoutFile = () => m(this.ERROR_90FeatureOnlyLayoutFile, `Touch layout file reference requires store(version) '9.0'or higher`);
325
- static ERROR_90FeatureOnlyKeyboardVersion = SevError | 0x05D;
326
- static Error_90FeatureOnlyKeyboardVersion = () => m(this.ERROR_90FeatureOnlyKeyboardVersion, `KeyboardVersion system store requires store(version) '9.0'or higher`);
327
- static ERROR_KeyboardVersionFormatInvalid = SevError | 0x05E;
328
- static Error_KeyboardVersionFormatInvalid = () => m(this.ERROR_KeyboardVersionFormatInvalid, `KeyboardVersion format is invalid, expecting dot-separated integers`);
329
- static ERROR_ContextExHasInvalidOffset = SevError | 0x05F;
330
- static Error_ContextExHasInvalidOffset = () => m(this.ERROR_ContextExHasInvalidOffset, `context() statement has offset out of range`);
331
- static ERROR_90FeatureOnlyEmbedCSS = SevError | 0x060;
332
- static Error_90FeatureOnlyEmbedCSS = () => m(this.ERROR_90FeatureOnlyEmbedCSS, `Embedding CSS requires store(version) '9.0'or higher`);
333
- static ERROR_90FeatureOnlyTargets = SevError | 0x061;
334
- static Error_90FeatureOnlyTargets = () => m(this.ERROR_90FeatureOnlyTargets, `TARGETS system store requires store(version) '9.0'or higher`);
335
- static ERROR_ContextAndIndexInvalidInMatchNomatch = SevError | 0x062;
336
- static Error_ContextAndIndexInvalidInMatchNomatch = () => m(this.ERROR_ContextAndIndexInvalidInMatchNomatch, `context and index statements cannot be used in a match or nomatch statement`);
337
- static ERROR_140FeatureOnlyContextAndNotAnyWeb = SevError | 0x063;
338
- static Error_140FeatureOnlyContextAndNotAnyWeb = () => m(this.ERROR_140FeatureOnlyContextAndNotAnyWeb, `For web and touch platforms, context() statement referring to notany() requires store(version) '14.0'or higher`);
339
- static ERROR_ExpansionMustFollowCharacterOrVKey = SevError | 0x064;
340
- static Error_ExpansionMustFollowCharacterOrVKey = () => m(this.ERROR_ExpansionMustFollowCharacterOrVKey, `An expansion must follow a character or a virtual key`);
341
- static ERROR_VKeyExpansionMustBeFollowedByVKey = SevError | 0x065;
342
- static Error_VKeyExpansionMustBeFollowedByVKey = () => m(this.ERROR_VKeyExpansionMustBeFollowedByVKey, `A virtual key expansion must be terminated by a virtual key`);
343
- static ERROR_CharacterExpansionMustBeFollowedByCharacter = SevError | 0x066;
344
- static Error_CharacterExpansionMustBeFollowedByCharacter = () => m(this.ERROR_CharacterExpansionMustBeFollowedByCharacter, `A character expansion must be terminated by a character key`);
345
- static ERROR_VKeyExpansionMustUseConsistentShift = SevError | 0x067;
346
- static Error_VKeyExpansionMustUseConsistentShift = () => m(this.ERROR_VKeyExpansionMustUseConsistentShift, `A virtual key expansion must use the same shift state for both terminators`);
347
- static ERROR_ExpansionMustBePositive = SevError | 0x068;
348
- static Error_ExpansionMustBePositive = () => m(this.ERROR_ExpansionMustBePositive, `An expansion must have positive difference (i.e. A-Z, not Z-A)`);
349
- static ERROR_CasedKeysMustContainOnlyVirtualKeys = SevError | 0x069;
350
- static Error_CasedKeysMustContainOnlyVirtualKeys = () => m(this.ERROR_CasedKeysMustContainOnlyVirtualKeys, `The &CasedKeys system store must contain only virtual keys or characters found on a US English keyboard`);
351
- static ERROR_CasedKeysMustNotIncludeShiftStates = SevError | 0x06A;
352
- static Error_CasedKeysMustNotIncludeShiftStates = () => m(this.ERROR_CasedKeysMustNotIncludeShiftStates, `The &CasedKeys system store must not include shift states`);
353
- static ERROR_CasedKeysNotSupportedWithMnemonicLayout = SevError | 0x06B;
354
- static Error_CasedKeysNotSupportedWithMnemonicLayout = () => m(this.ERROR_CasedKeysNotSupportedWithMnemonicLayout, `The &CasedKeys system store is not supported with mnemonic layouts`);
355
- static ERROR_CannotUseReadWriteGroupFromReadonlyGroup = SevError | 0x06C;
356
- static Error_CannotUseReadWriteGroupFromReadonlyGroup = () => m(this.ERROR_CannotUseReadWriteGroupFromReadonlyGroup, `Group used from a readonly group must also be readonly`);
357
- static ERROR_StatementNotPermittedInReadonlyGroup = SevError | 0x06D;
358
- static Error_StatementNotPermittedInReadonlyGroup = () => m(this.ERROR_StatementNotPermittedInReadonlyGroup, `Statement is not permitted in output of readonly group`);
359
- static ERROR_OutputInReadonlyGroup = SevError | 0x06E;
360
- static Error_OutputInReadonlyGroup = () => m(this.ERROR_OutputInReadonlyGroup, `Output is not permitted in a readonly group`);
361
- static ERROR_NewContextGroupMustBeReadonly = SevError | 0x06F;
362
- static Error_NewContextGroupMustBeReadonly = () => m(this.ERROR_NewContextGroupMustBeReadonly, `Group used in begin newContext must be readonly`);
363
- static ERROR_PostKeystrokeGroupMustBeReadonly = SevError | 0x070;
364
- static Error_PostKeystrokeGroupMustBeReadonly = () => m(this.ERROR_PostKeystrokeGroupMustBeReadonly, `Group used in begin postKeystroke must be readonly`);
365
- static ERROR_DuplicateGroup = SevError | 0x071;
366
- static Error_DuplicateGroup = () => m(this.ERROR_DuplicateGroup, `A group with this name has already been defined.`);
367
- static ERROR_DuplicateStore = SevError | 0x072;
368
- static Error_DuplicateStore = () => m(this.ERROR_DuplicateStore, `A store with this name has already been defined.`);
369
- static ERROR_RepeatedBegin = SevError | 0x073;
370
- static Error_RepeatedBegin = () => m(this.ERROR_RepeatedBegin, `Begin has already been set`);
371
- static ERROR_VirtualKeyInContext = SevError | 0x074;
372
- static Error_VirtualKeyInContext = () => m(this.ERROR_VirtualKeyInContext, `Virtual keys are not permitted in context`);
373
- static ERROR_OutsTooLong = SevError | 0x075;
374
- static Error_OutsTooLong = () => m(this.ERROR_OutsTooLong, `Store cannot be inserted with outs() as it makes the extended string too long`);
375
- static ERROR_ExtendedStringTooLong = SevError | 0x076;
376
- static Error_ExtendedStringTooLong = () => m(this.ERROR_ExtendedStringTooLong, `Extended string is too long`);
377
- static ERROR_VirtualKeyExpansionTooLong = SevError | 0x077;
378
- static Error_VirtualKeyExpansionTooLong = () => m(this.ERROR_VirtualKeyExpansionTooLong, `Virtual key expansion is too large`);
379
- static ERROR_CharacterRangeTooLong = SevError | 0x078;
380
- static Error_CharacterRangeTooLong = () => m(this.ERROR_CharacterRangeTooLong, `Character range is too large and cannot be expanded`);
381
- static WARN_TooManyWarnings = SevWarn | 0x080;
382
- static Warn_TooManyWarnings = () => m(this.WARN_TooManyWarnings, `Too many warnings or errors`);
383
- static WARN_OldVersion = SevWarn | 0x081;
384
- static Warn_OldVersion = () => m(this.WARN_OldVersion, `The keyboard file is an old version`);
385
- static WARN_BitmapNotUsed = SevWarn | 0x082;
386
- static Warn_BitmapNotUsed = () => m(this.WARN_BitmapNotUsed, `The 'bitmaps' statement is obsolete and only the first bitmap referred to will be used, you should use 'bitmap'.`);
387
- static WARN_CustomLanguagesNotSupported = SevWarn | 0x083;
388
- static Warn_CustomLanguagesNotSupported = () => m(this.WARN_CustomLanguagesNotSupported, `Languages over 0x1FF, 0x1F are not supported correctly by Windows. You should use no LANGUAGE line instead.`);
389
- static WARN_KeyBadLength = SevWarn | 0x084;
390
- static Warn_KeyBadLength = () => m(this.WARN_KeyBadLength, `There are too many characters in the keystroke part of the rule.`);
391
- static WARN_IndexStoreShort = SevWarn | 0x085;
392
- static Warn_IndexStoreShort = () => m(this.WARN_IndexStoreShort, `The store referenced in index() is shorter than the store referenced in any()`);
393
- static WARN_UnicodeInANSIGroup = SevWarn | 0x086;
394
- static Warn_UnicodeInANSIGroup = () => m(this.WARN_UnicodeInANSIGroup, `A Unicode character was found in an ANSI group`);
395
- static WARN_ANSIInUnicodeGroup = SevWarn | 0x087;
396
- static Warn_ANSIInUnicodeGroup = () => m(this.WARN_ANSIInUnicodeGroup, `An ANSI character was found in a Unicode group`);
397
- static WARN_UnicodeSurrogateUsed = SevWarn | 0x088;
398
- static Warn_UnicodeSurrogateUsed = () => m(this.WARN_UnicodeSurrogateUsed, `A Unicode surrogate character was found. You should use Unicode scalar values to represent values > U+FFFF`);
399
- static WARN_ReservedCharacter = SevWarn | 0x089;
400
- static Warn_ReservedCharacter = () => m(this.WARN_ReservedCharacter, `A Unicode character was found that should not be used`);
401
- // Note: INFO_Info is called CWARN_Info in kmn_compiler_errors.h, but should have an "info" severity
402
- static INFO_Info = SevInfo | 0x08A;
403
- static Info_Info = () => m(this.INFO_Info, `Information`);
404
- static WARN_VirtualKeyWithMnemonicLayout = SevWarn | 0x08B;
405
- static Warn_VirtualKeyWithMnemonicLayout = () => m(this.WARN_VirtualKeyWithMnemonicLayout, `Virtual key used instead of virtual character key with a mnemonic layout`);
406
- static WARN_VirtualCharKeyWithPositionalLayout = SevWarn | 0x08C;
407
- static Warn_VirtualCharKeyWithPositionalLayout = () => m(this.WARN_VirtualCharKeyWithPositionalLayout, `Virtual character key used with a positional layout instead of mnemonic layout`);
408
- static WARN_StoreAlreadyUsedAsOptionOrCall = SevWarn | 0x08D;
409
- static Warn_StoreAlreadyUsedAsOptionOrCall = () => m(this.WARN_StoreAlreadyUsedAsOptionOrCall, `Store already used as an option or in a call statement and should not be used as a normal store`);
410
- static WARN_StoreAlreadyUsedAsStoreOrCall = SevWarn | 0x08E;
411
- static Warn_StoreAlreadyUsedAsStoreOrCall = () => m(this.WARN_StoreAlreadyUsedAsStoreOrCall, `Store already used as a normal store or in a call statement and should not be used as an option`);
412
- static WARN_StoreAlreadyUsedAsStoreOrOption = SevWarn | 0x08F;
413
- static Warn_StoreAlreadyUsedAsStoreOrOption = () => m(this.WARN_StoreAlreadyUsedAsStoreOrOption, `Store already used as a normal store or as an option and should not be used in a call statement`);
414
- static WARN_PunctuationInEthnologueCode = SevWarn | 0x090;
415
- static Warn_PunctuationInEthnologueCode = () => m(this.WARN_PunctuationInEthnologueCode, `Punctuation should not be used to separate Ethnologue codes; instead use spaces`);
416
- static WARN_TouchLayoutMissingLayer = SevWarn | 0x091;
417
- static Warn_TouchLayoutMissingLayer = (o) => mw(this.WARN_TouchLayoutMissingLayer, `Key "${def(o.keyId)}" on platform "${def(o.platformName)}", layer "${def(o.layerId)}", references a missing layer "${def(o.nextLayer)}"`);
418
- static WARN_TouchLayoutCustomKeyNotDefined = SevWarn | 0x092;
419
- static Warn_TouchLayoutCustomKeyNotDefined = (o) => mw(this.WARN_TouchLayoutCustomKeyNotDefined, `Key "${def(o.keyId)}" on platform "${def(o.platformName)}", layer "${def(o.layerId)}", is a custom key but has no corresponding rule in the source.`);
420
- static WARN_TouchLayoutMissingRequiredKeys = SevWarn | 0x093;
421
- static Warn_TouchLayoutMissingRequiredKeys = (o) => mw(this.WARN_TouchLayoutMissingRequiredKeys, `Layer "${def(o.layerId)}" on platform "${def(o.platformName)}" is missing the required key(s) '${def(o.missingKeys)}'.`);
422
- static WARN_HelpFileMissing = SevWarn | 0x094;
423
- static Warn_HelpFileMissing = (o) => mw(this.WARN_HelpFileMissing, `File ${def(o.helpFilename)} could not be loaded: ${(o.e ?? '').toString()}`, o);
424
- static WARN_EmbedJsFileMissing = SevWarn | 0x095;
425
- static Warn_EmbedJsFileMissing = (o) => mw(this.WARN_EmbedJsFileMissing, `File ${def(o.jsFilename)} could not be loaded: ${(o.e ?? '').toString()}`, o);
426
- // static WARN_TouchLayoutFileMissing = SevWarn | 0x096;
427
- // static WARN_VisualKeyboardFileMissing = SevWarn | 0x097;
428
- static WARN_ExtendedShiftFlagsNotSupportedInKeymanWeb = SevWarn | 0x098;
429
- static Warn_ExtendedShiftFlagsNotSupportedInKeymanWeb = (o) => mw(this.WARN_ExtendedShiftFlagsNotSupportedInKeymanWeb, `Extended shift flags ${def(o.flags)} are not supported in KeymanWeb`, o);
430
- static WARN_TouchLayoutUnidentifiedKey = SevWarn | 0x099;
431
- static Warn_TouchLayoutUnidentifiedKey = (o) => mw(this.WARN_TouchLayoutUnidentifiedKey, `A key on layer "${def(o.layerId)}" has no identifier.`);
432
- static HINT_UnreachableKeyCode = SevHint | 0x09A;
433
- 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);
434
- // static WARN_CouldNotCopyJsonFile = SevWarn | 0x09B;
435
- static WARN_PlatformNotInTargets = SevWarn | 0x09C;
436
- static Warn_PlatformNotInTargets = () => m(this.WARN_PlatformNotInTargets, `The specified platform is not a target platform`);
437
- static WARN_HeaderStatementIsDeprecated = SevWarn | 0x09D;
438
- static Warn_HeaderStatementIsDeprecated = () => m(this.WARN_HeaderStatementIsDeprecated, `Header statements are deprecated; use instead the equivalent system store`);
439
- static WARN_UseNotLastStatementInRule = SevWarn | 0x09E;
440
- static Warn_UseNotLastStatementInRule = () => m(this.WARN_UseNotLastStatementInRule, `A rule with use() statements in the output should not have other content following the use() statements`);
441
- static WARN_TouchLayoutFontShouldBeSameForAllPlatforms = SevWarn | 0x09F;
442
- static Warn_TouchLayoutFontShouldBeSameForAllPlatforms = () => mw(this.WARN_TouchLayoutFontShouldBeSameForAllPlatforms, `The touch layout font should be the same for all platforms.`);
443
- // static WARN_InvalidJSONMetadataFile = SevWarn | 0x0A0;
444
- // static WARN_JSONMetadataOSKFontShouldMatchTouchFont = SevWarn | 0x0A1;
445
- static WARN_KVKFileIsInSourceFormat = SevWarn | 0x0A2;
446
- static Warn_KVKFileIsInSourceFormat = () => m(this.WARN_KVKFileIsInSourceFormat, `.kvk file should be binary but is an XML file`);
447
- // 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`);
448
- static WARN_DontMixChiralAndNonChiralModifiers = SevWarn | 0x0A3;
449
- 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.`);
450
- static WARN_MixingLeftAndRightModifiers = SevWarn | 0x0A4;
451
- static Warn_MixingLeftAndRightModifiers = () => m(this.WARN_MixingLeftAndRightModifiers, `Left and right modifiers should not both be used in the same rule`);
452
- static WARN_LanguageHeadersDeprecatedInKeyman10 = SevWarn | 0x0A5;
453
- static Warn_LanguageHeadersDeprecatedInKeyman10 = () => m(this.WARN_LanguageHeadersDeprecatedInKeyman10, `This language header has been deprecated in Keyman 10. Instead, add language metadata in the package file`);
454
- static HINT_NonUnicodeFile = SevHint | 0x0A6;
455
- static Hint_NonUnicodeFile = () => m(this.HINT_NonUnicodeFile, `Keyman Developer has detected that the file has ANSI encoding. Consider converting this file to UTF-8`);
456
- // static WARN_TooManyErrorsOrWarnings = SevWarn | 0x0A7;
457
- static WARN_HotkeyHasInvalidModifier = SevWarn | 0x0A8;
458
- static Warn_HotkeyHasInvalidModifier = () => m(this.WARN_HotkeyHasInvalidModifier, `Hotkey has modifiers that are not supported. Use only SHIFT, CTRL and ALT`);
459
- static WARN_TouchLayoutSpecialLabelOnNormalKey = SevWarn | 0x0A9;
460
- static Warn_TouchLayoutSpecialLabelOnNormalKey = (o) => mw(this.WARN_TouchLayoutSpecialLabelOnNormalKey, `Key "${def(o.keyId)}" on platform "${def(o.platformName)}", layer "${def(o.layerId)}" does not have ` +
461
- `the key type "Special" or "Special (active)" but has the label "${def(o.label)}". This feature is only supported in Keyman 14 or later`);
462
- static WARN_OptionStoreNameInvalid = SevWarn | 0x0AA;
463
- 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.`);
464
- static WARN_NulNotFirstStatementInContext = SevWarn | 0x0AB;
465
- static Warn_NulNotFirstStatementInContext = () => m(this.WARN_NulNotFirstStatementInContext, `nul must be the first statement in the context`);
466
- static WARN_IfShouldBeAtStartOfContext = SevWarn | 0x0AC;
467
- static Warn_IfShouldBeAtStartOfContext = () => m(this.WARN_IfShouldBeAtStartOfContext, `if, platform and baselayout should be at start of context (after nul, if present)`);
468
- static WARN_KeyShouldIncludeNCaps = SevWarn | 0x0AD;
469
- static Warn_KeyShouldIncludeNCaps = () => m(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`);
470
- static HINT_UnreachableRule = SevHint | 0x0AE;
471
- static Hint_UnreachableRule = () => m(this.HINT_UnreachableRule, `This rule will never be matched as another rule takes precedence`);
472
- static WARN_VirtualKeyInOutput = SevWarn | 0x0AF;
473
- static Warn_VirtualKeyInOutput = () => m(this.WARN_VirtualKeyInOutput, `Virtual keys are not supported in output`);
474
- static FATAL_BufferOverflow = SevFatal | 0x0C0;
475
- static Fatal_BufferOverflow = () => m(this.FATAL_BufferOverflow, `The compiler memory buffer overflowed`);
476
- static FATAL_Break = SevFatal | 0x0C1;
477
- static Fatal_Break = () => m(this.FATAL_Break, `Compiler interrupted by user`);
478
- }
479
- ;
480
- /**
481
- * @internal
482
- * TODO: This class is here as a stopgap as we merged it with
483
- * KmnCompilerMessages. It should be removed in v18.0.
484
- */
485
- export class CompilerMessages extends KmnCompilerMessages {
486
- }
487
- export function mapErrorFromKmcmplib(line, code, msg) {
488
- const severity = LogLevelToSeverity[code & 61440 /* LogLevel.LEVEL_MASK */];
489
- const baseCode = code & 4095 /* LogLevel.CODE_MASK */;
490
- const event = {
491
- line: line,
492
- code: severity | CompilerErrorNamespace.KmnCompiler | baseCode,
493
- message: msg
494
- };
495
- return event;
496
- }
497
- ;
498
- //# sourceMappingURL=kmn-compiler-messages.js.map
499
- //# debugId=3a304788-7246-5673-839a-278ec31bac3d
146
+ to the file.`);
147
+ // static INFO_None = SevInfo | 0x000;
148
+ static INFO_EndOfFile = SevInfo | 0x001;
149
+ static Info_EndOfFile = () => m(this.INFO_EndOfFile, `(no error - reserved code)`);
150
+ static FATAL_BadCallParams = SevFatal | 0x002;
151
+ static Fatal_BadCallParams = () => m(this.FATAL_BadCallParams, `CompileKeyboardFile was called with bad parameters`);
152
+ static FATAL_CannotAllocateMemory = SevFatal | 0x004;
153
+ static Fatal_CannotAllocateMemory = () => m(this.FATAL_CannotAllocateMemory, `Out of memory`);
154
+ static ERROR_InfileNotExist = SevError | 0x005; // #10678: reduced from fatal to error in 17.0
155
+ static Error_InfileNotExist = () => m(this.ERROR_InfileNotExist, `Cannot find the input file`);
156
+ // static ERROR_CannotCreateOutfile = SevError | 0x006; // #10678: reduced from fatal to error in 17.0, but unused
157
+ // static Error_CannotCreateOutfile = () => m(this.ERROR_CannotCreateOutfile, `Cannot open output file for writing`); unused
158
+ static FATAL_UnableToWriteFully = SevFatal | 0x007;
159
+ static Fatal_UnableToWriteFully = () => m(this.FATAL_UnableToWriteFully, `Unable to write the file completely`);
160
+ static ERROR_CannotReadInfile = SevError | 0x008; // #10678: reduced from fatal to error in 17.0
161
+ static Error_CannotReadInfile = () => m(this.ERROR_CannotReadInfile, `Cannot read the input file`);
162
+ static FATAL_SomewhereIGotItWrong = SevFatal | 0x009;
163
+ static Fatal_SomewhereIGotItWrong = () => m(this.FATAL_SomewhereIGotItWrong, `Internal error: contact Keyman`);
164
+ static ERROR_InvalidToken = SevError | 0x00A;
165
+ static Error_InvalidToken = () => m(this.ERROR_InvalidToken, `Invalid token found`);
166
+ // kmcmplib: static Error_InvalidBegin = () => m(this.ERROR_InvalidBegin, `Invalid 'begin' command`);
167
+ static ERROR_InvalidBegin = SevError | 0x00B;
168
+ static Error_InvalidBegin = () => mw(this.ERROR_InvalidBegin, `A "begin unicode" statement is required to compile a KeymanWeb keyboard`);
169
+ static ERROR_InvalidName = SevError | 0x00C;
170
+ static Error_InvalidName = () => m(this.ERROR_InvalidName, `Invalid 'name' command`);
171
+ static ERROR_InvalidVersion = SevError | 0x00D;
172
+ static Error_InvalidVersion = () => m(this.ERROR_InvalidVersion, `Invalid 'version' command`);
173
+ static ERROR_InvalidLanguageLine = SevError | 0x00E;
174
+ static Error_InvalidLanguageLine = () => m(this.ERROR_InvalidLanguageLine, `Invalid 'language' command`);
175
+ static ERROR_LayoutButNoLanguage = SevError | 0x00F;
176
+ static Error_LayoutButNoLanguage = () => m(this.ERROR_LayoutButNoLanguage, `Layout command found but no language command`);
177
+ static ERROR_InvalidLayoutLine = SevError | 0x010;
178
+ static Error_InvalidLayoutLine = () => m(this.ERROR_InvalidLayoutLine, `Invalid 'layout' command`);
179
+ static ERROR_NoVersionLine = SevError | 0x011;
180
+ static Error_NoVersionLine = () => m(this.ERROR_NoVersionLine, `No version line found for file`);
181
+ static ERROR_InvalidGroupLine = SevError | 0x012;
182
+ static Error_InvalidGroupLine = () => m(this.ERROR_InvalidGroupLine, `Invalid 'group' command`);
183
+ static ERROR_InvalidStoreLine = SevError | 0x013;
184
+ static Error_InvalidStoreLine = () => m(this.ERROR_InvalidStoreLine, `Invalid 'store' command`);
185
+ static ERROR_InvalidCodeInKeyPartOfRule = SevError | 0x014;
186
+ static Error_InvalidCodeInKeyPartOfRule = () => m(this.ERROR_InvalidCodeInKeyPartOfRule, `Invalid command or code found in key part of rule`);
187
+ static ERROR_InvalidDeadkey = SevError | 0x015;
188
+ static Error_InvalidDeadkey = () => m(this.ERROR_InvalidDeadkey, `Invalid 'deadkey' or 'dk' command`);
189
+ static ERROR_InvalidValue = SevError | 0x016;
190
+ static Error_InvalidValue = () => m(this.ERROR_InvalidValue, `Invalid value in extended string`);
191
+ static ERROR_ZeroLengthString = SevError | 0x017;
192
+ static Error_ZeroLengthString = () => m(this.ERROR_ZeroLengthString, `A string of zero characters was found`);
193
+ static ERROR_TooManyIndexToKeyRefs = SevError | 0x018;
194
+ static Error_TooManyIndexToKeyRefs = () => m(this.ERROR_TooManyIndexToKeyRefs, `Too many index commands refering to key string`);
195
+ static ERROR_UnterminatedString = SevError | 0x019;
196
+ static Error_UnterminatedString = () => m(this.ERROR_UnterminatedString, `Unterminated string in line`);
197
+ static ERROR_StringInVirtualKeySection = SevError | 0x01A;
198
+ static Error_StringInVirtualKeySection = () => m(this.ERROR_StringInVirtualKeySection, `extend string illegal in virtual key section`);
199
+ static ERROR_AnyInVirtualKeySection = SevError | 0x01B;
200
+ static Error_AnyInVirtualKeySection = () => m(this.ERROR_AnyInVirtualKeySection, `'any' command is illegal in virtual key section`);
201
+ static ERROR_InvalidAny = SevError | 0x01C;
202
+ static Error_InvalidAny = () => m(this.ERROR_InvalidAny, `Invalid 'any' command`);
203
+ static ERROR_StoreDoesNotExist = SevError | 0x01D;
204
+ static Error_StoreDoesNotExist = () => m(this.ERROR_StoreDoesNotExist, `Store referenced does not exist`);
205
+ static ERROR_BeepInVirtualKeySection = SevError | 0x01E;
206
+ static Error_BeepInVirtualKeySection = () => m(this.ERROR_BeepInVirtualKeySection, `'beep' command is illegal in virtual key section`);
207
+ static ERROR_IndexInVirtualKeySection = SevError | 0x01F;
208
+ static Error_IndexInVirtualKeySection = () => m(this.ERROR_IndexInVirtualKeySection, `'index' command is illegal in virtual key section`);
209
+ static ERROR_InvalidIndex = SevError | 0x020;
210
+ static Error_InvalidIndex = () => m(this.ERROR_InvalidIndex, `Invalid 'index' command`);
211
+ static ERROR_OutsInVirtualKeySection = SevError | 0x021;
212
+ static Error_OutsInVirtualKeySection = () => m(this.ERROR_OutsInVirtualKeySection, `'outs' command is illegal in virtual key section`);
213
+ static ERROR_InvalidOuts = SevError | 0x022;
214
+ static Error_InvalidOuts = () => m(this.ERROR_InvalidOuts, `Invalid 'outs' command`);
215
+ static ERROR_ContextInVirtualKeySection = SevError | 0x024;
216
+ static Error_ContextInVirtualKeySection = () => m(this.ERROR_ContextInVirtualKeySection, `'context' command is illegal in virtual key section`);
217
+ static ERROR_InvalidUse = SevError | 0x025;
218
+ static Error_InvalidUse = () => m(this.ERROR_InvalidUse, `Invalid 'use' command`);
219
+ static ERROR_GroupDoesNotExist = SevError | 0x026;
220
+ static Error_GroupDoesNotExist = () => m(this.ERROR_GroupDoesNotExist, `Group does not exist`);
221
+ static ERROR_VirtualKeyNotAllowedHere = SevError | 0x027;
222
+ static Error_VirtualKeyNotAllowedHere = () => m(this.ERROR_VirtualKeyNotAllowedHere, `Virtual key is not allowed here`);
223
+ static ERROR_InvalidSwitch = SevError | 0x028;
224
+ static Error_InvalidSwitch = () => m(this.ERROR_InvalidSwitch, `Invalid 'switch' command`);
225
+ static ERROR_NoTokensFound = SevError | 0x029;
226
+ static Error_NoTokensFound = () => m(this.ERROR_NoTokensFound, `No tokens found in line`);
227
+ static ERROR_InvalidLineContinuation = SevError | 0x02A;
228
+ static Error_InvalidLineContinuation = () => m(this.ERROR_InvalidLineContinuation, `Invalid line continuation`);
229
+ static ERROR_LineTooLong = SevError | 0x02B;
230
+ static Error_LineTooLong = () => m(this.ERROR_LineTooLong, `Line too long`);
231
+ static ERROR_InvalidCopyright = SevError | 0x02C;
232
+ static Error_InvalidCopyright = () => m(this.ERROR_InvalidCopyright, `Invalid 'copyright' command`);
233
+ static ERROR_CodeInvalidInThisSection = SevError | 0x02D;
234
+ static Error_CodeInvalidInThisSection = () => m(this.ERROR_CodeInvalidInThisSection, `This line is invalid in this section of the file`);
235
+ static ERROR_InvalidMessage = SevError | 0x02E;
236
+ static Error_InvalidMessage = () => m(this.ERROR_InvalidMessage, `Invalid 'message' command`);
237
+ static ERROR_InvalidLanguageName = SevError | 0x02F;
238
+ static Error_InvalidLanguageName = () => m(this.ERROR_InvalidLanguageName, `Invalid 'languagename' command`);
239
+ static ERROR_InvalidBitmapLine = SevError | 0x030;
240
+ static Error_InvalidBitmapLine = () => m(this.ERROR_InvalidBitmapLine, `Invalid 'bitmaps' command`);
241
+ static ERROR_CannotReadBitmapFile = SevError | 0x031;
242
+ static Error_CannotReadBitmapFile = () => m(this.ERROR_CannotReadBitmapFile, `Cannot open the bitmap or icon file for reading`);
243
+ static ERROR_IndexDoesNotPointToAny = SevError | 0x032;
244
+ static Error_IndexDoesNotPointToAny = () => m(this.ERROR_IndexDoesNotPointToAny, `An index() in the output does not have a corresponding any() statement`);
245
+ static ERROR_ReservedCharacter = SevError | 0x033;
246
+ static Error_ReservedCharacter = () => m(this.ERROR_ReservedCharacter, `A reserved character was found`);
247
+ static ERROR_InvalidCharacter = SevError | 0x034;
248
+ static Error_InvalidCharacter = () => m(this.ERROR_InvalidCharacter, `A character was found that is outside the valid Unicode range (U+0000 - U+10FFFF)`);
249
+ static ERROR_InvalidCall = SevError | 0x035;
250
+ static Error_InvalidCall = () => m(this.ERROR_InvalidCall, `The 'call' command is invalid`);
251
+ static ERROR_CallInVirtualKeySection = SevError | 0x036;
252
+ static Error_CallInVirtualKeySection = () => m(this.ERROR_CallInVirtualKeySection, `'call' command is illegal in virtual key section`);
253
+ static ERROR_CodeInvalidInKeyStore = SevError | 0x037;
254
+ static Error_CodeInvalidInKeyStore = () => m(this.ERROR_CodeInvalidInKeyStore, `The command is invalid inside a store that is used in a key part of the rule`);
255
+ static ERROR_CannotLoadIncludeFile = SevError | 0x038;
256
+ static Error_CannotLoadIncludeFile = () => m(this.ERROR_CannotLoadIncludeFile, `Cannot load the included file: it is either invalid or does not exist`);
257
+ static ERROR_60FeatureOnly_EthnologueCode = SevError | 0x039;
258
+ static Error_60FeatureOnly_EthnologueCode = () => m(this.ERROR_60FeatureOnly_EthnologueCode, `EthnologueCode system store requires VERSION 6.0 or higher`);
259
+ static ERROR_60FeatureOnly_MnemonicLayout = SevError | 0x03A;
260
+ static Error_60FeatureOnly_MnemonicLayout = () => m(this.ERROR_60FeatureOnly_MnemonicLayout, `MnemonicLayout functionality requires VERSION 6.0 or higher`);
261
+ static ERROR_60FeatureOnly_OldCharPosMatching = SevError | 0x03B;
262
+ static Error_60FeatureOnly_OldCharPosMatching = () => m(this.ERROR_60FeatureOnly_OldCharPosMatching, `OldCharPosMatching system store requires VERSION 6.0 or higher`);
263
+ static ERROR_60FeatureOnly_NamedCodes = SevError | 0x03C;
264
+ static Error_60FeatureOnly_NamedCodes = () => m(this.ERROR_60FeatureOnly_NamedCodes, `Named character constants requires VERSION 6.0 or higher`);
265
+ static ERROR_60FeatureOnly_Contextn = SevError | 0x03D;
266
+ static Error_60FeatureOnly_Contextn = () => m(this.ERROR_60FeatureOnly_Contextn, `Context(n) requires VERSION 6.0 or higher`);
267
+ static ERROR_501FeatureOnly_Call = SevError | 0x03E;
268
+ static Error_501FeatureOnly_Call = () => m(this.ERROR_501FeatureOnly_Call, `Call() requires VERSION 5.01 or higher`);
269
+ static ERROR_InvalidNamedCode = SevError | 0x03F;
270
+ static Error_InvalidNamedCode = () => m(this.ERROR_InvalidNamedCode, `Invalid named code constant`);
271
+ static ERROR_InvalidSystemStore = SevError | 0x040;
272
+ static Error_InvalidSystemStore = () => m(this.ERROR_InvalidSystemStore, `Invalid system store name found`);
273
+ static ERROR_60FeatureOnly_VirtualCharKey = SevError | 0x044;
274
+ static Error_60FeatureOnly_VirtualCharKey = () => m(this.ERROR_60FeatureOnly_VirtualCharKey, `Virtual character keys require VERSION 6.0 or higher`);
275
+ static ERROR_VersionAlreadyIncluded = SevError | 0x045;
276
+ static Error_VersionAlreadyIncluded = () => m(this.ERROR_VersionAlreadyIncluded, `Only one VERSION or store(version) line allowed in a source file.`);
277
+ static ERROR_70FeatureOnly = SevError | 0x046;
278
+ static Error_70FeatureOnly = () => m(this.ERROR_70FeatureOnly, `This feature requires store(version) '7.0' or higher`);
279
+ static ERROR_80FeatureOnly = SevError | 0x047;
280
+ static Error_80FeatureOnly = () => m(this.ERROR_80FeatureOnly, `This feature requires store(version) '8.0' or higher`);
281
+ static ERROR_InvalidInVirtualKeySection = SevError | 0x048;
282
+ static Error_InvalidInVirtualKeySection = () => m(this.ERROR_InvalidInVirtualKeySection, `This statement is not valid in a virtual key section`);
283
+ static ERROR_InvalidIf = SevError | 0x049;
284
+ static Error_InvalidIf = () => m(this.ERROR_InvalidIf, `The if() statement is not valid`);
285
+ static ERROR_InvalidReset = SevError | 0x04A;
286
+ static Error_InvalidReset = () => m(this.ERROR_InvalidReset, `The reset() statement is not valid`);
287
+ static ERROR_InvalidSet = SevError | 0x04B;
288
+ static Error_InvalidSet = () => m(this.ERROR_InvalidSet, `The set() statement is not valid`);
289
+ static ERROR_InvalidSave = SevError | 0x04C;
290
+ static Error_InvalidSave = () => m(this.ERROR_InvalidSave, `The save() statement is not valid`);
291
+ static ERROR_InvalidEthnologueCode = SevError | 0x04D;
292
+ static Error_InvalidEthnologueCode = () => m(this.ERROR_InvalidEthnologueCode, `Invalid ethnologuecode format`);
293
+ static FATAL_CannotCreateTempfile = SevFatal | 0x04E;
294
+ static Fatal_CannotCreateTempfile = () => m(this.FATAL_CannotCreateTempfile, `Cannot create temp file`);
295
+ static ERROR_90FeatureOnly_IfSystemStores = SevError | 0x04F;
296
+ static Error_90FeatureOnly_IfSystemStores = () => m(this.ERROR_90FeatureOnly_IfSystemStores, `if(store) requires store(version) '9.0' or higher`);
297
+ static ERROR_IfSystemStore_NotFound = SevError | 0x050;
298
+ static Error_IfSystemStore_NotFound = () => m(this.ERROR_IfSystemStore_NotFound, `System store in if() not found`);
299
+ static ERROR_90FeatureOnly_SetSystemStores = SevError | 0x051;
300
+ static Error_90FeatureOnly_SetSystemStores = () => m(this.ERROR_90FeatureOnly_SetSystemStores, `set(store) requires store(version) '9.0' or higher`);
301
+ static ERROR_SetSystemStore_NotFound = SevError | 0x052;
302
+ static Error_SetSystemStore_NotFound = () => m(this.ERROR_SetSystemStore_NotFound, `System store in set() not found`);
303
+ static ERROR_90FeatureOnlyVirtualKeyDictionary = SevError | 0x053;
304
+ static Error_90FeatureOnlyVirtualKeyDictionary = () => m(this.ERROR_90FeatureOnlyVirtualKeyDictionary, `Custom virtual key names require store(version) '9.0'`);
305
+ static ERROR_NotSupportedInKeymanWebContext = SevError | 0x054;
306
+ static Error_NotSupportedInKeymanWebContext = (o) => mw(this.ERROR_NotSupportedInKeymanWebContext, `Statement '${def(o.code)}' is not currently supported in context for web and touch targets`, o);
307
+ static ERROR_NotSupportedInKeymanWebOutput = SevError | 0x055;
308
+ static Error_NotSupportedInKeymanWebOutput = (o) => mw(this.ERROR_NotSupportedInKeymanWebOutput, `Statement '${def(o.code)}' is not currently supported in output for web and touch targets`, o);
309
+ static ERROR_NotSupportedInKeymanWebStore = SevError | 0x056;
310
+ static Error_NotSupportedInKeymanWebStore = (o) => mw(this.ERROR_NotSupportedInKeymanWebStore, `'${def(o.code)}' is not currently supported in store '${def(o.store)}' when used by any or index for web and touch targets`);
311
+ static ERROR_VirtualCharacterKeysNotSupportedInKeymanWeb = SevError | 0x057;
312
+ static Error_VirtualCharacterKeysNotSupportedInKeymanWeb = (o) => mw(this.ERROR_VirtualCharacterKeysNotSupportedInKeymanWeb, `Virtual character keys not currently supported in KeymanWeb`, o);
313
+ static ERROR_VirtualKeysNotValidForMnemonicLayouts = SevError | 0x058;
314
+ static Error_VirtualKeysNotValidForMnemonicLayouts = (o) => mw(this.ERROR_VirtualKeysNotValidForMnemonicLayouts, `Virtual keys are not valid for mnemonic layouts`, o);
315
+ static ERROR_InvalidTouchLayoutFile = SevError | 0x059;
316
+ static Error_InvalidTouchLayoutFile = (o) => mw(this.ERROR_InvalidTouchLayoutFile, `Touch layout file ${def(o.filename)} is not valid`);
317
+ static ERROR_TouchLayoutInvalidIdentifier = SevError | 0x05A;
318
+ static Error_TouchLayoutInvalidIdentifier = (o) => mw(this.ERROR_TouchLayoutInvalidIdentifier, `Key "${def(o.keyId)}" on "${def(o.platformName)}", layer "${def(o.layerId)}" has an invalid identifier.`);
319
+ static ERROR_InvalidKeyCode = SevError | 0x05B;
320
+ static Error_InvalidKeyCode = (o) => mw(this.ERROR_InvalidKeyCode, `Invalid key identifier "${def(o.keyId)}"`);
321
+ static ERROR_90FeatureOnlyLayoutFile = SevError | 0x05C;
322
+ static Error_90FeatureOnlyLayoutFile = () => m(this.ERROR_90FeatureOnlyLayoutFile, `Touch layout file reference requires store(version) '9.0'or higher`);
323
+ static ERROR_90FeatureOnlyKeyboardVersion = SevError | 0x05D;
324
+ static Error_90FeatureOnlyKeyboardVersion = () => m(this.ERROR_90FeatureOnlyKeyboardVersion, `KeyboardVersion system store requires store(version) '9.0'or higher`);
325
+ static ERROR_KeyboardVersionFormatInvalid = SevError | 0x05E;
326
+ static Error_KeyboardVersionFormatInvalid = () => m(this.ERROR_KeyboardVersionFormatInvalid, `KeyboardVersion format is invalid, expecting dot-separated integers`);
327
+ static ERROR_ContextExHasInvalidOffset = SevError | 0x05F;
328
+ static Error_ContextExHasInvalidOffset = () => m(this.ERROR_ContextExHasInvalidOffset, `context() statement has offset out of range`);
329
+ static ERROR_90FeatureOnlyEmbedCSS = SevError | 0x060;
330
+ static Error_90FeatureOnlyEmbedCSS = () => m(this.ERROR_90FeatureOnlyEmbedCSS, `Embedding CSS requires store(version) '9.0'or higher`);
331
+ static ERROR_90FeatureOnlyTargets = SevError | 0x061;
332
+ static Error_90FeatureOnlyTargets = () => m(this.ERROR_90FeatureOnlyTargets, `TARGETS system store requires store(version) '9.0'or higher`);
333
+ static ERROR_ContextAndIndexInvalidInMatchNomatch = SevError | 0x062;
334
+ static Error_ContextAndIndexInvalidInMatchNomatch = () => m(this.ERROR_ContextAndIndexInvalidInMatchNomatch, `context and index statements cannot be used in a match or nomatch statement`);
335
+ static ERROR_140FeatureOnlyContextAndNotAnyWeb = SevError | 0x063;
336
+ static Error_140FeatureOnlyContextAndNotAnyWeb = () => m(this.ERROR_140FeatureOnlyContextAndNotAnyWeb, `For web and touch platforms, context() statement referring to notany() requires store(version) '14.0'or higher`);
337
+ static ERROR_ExpansionMustFollowCharacterOrVKey = SevError | 0x064;
338
+ static Error_ExpansionMustFollowCharacterOrVKey = () => m(this.ERROR_ExpansionMustFollowCharacterOrVKey, `An expansion must follow a character or a virtual key`);
339
+ static ERROR_VKeyExpansionMustBeFollowedByVKey = SevError | 0x065;
340
+ static Error_VKeyExpansionMustBeFollowedByVKey = () => m(this.ERROR_VKeyExpansionMustBeFollowedByVKey, `A virtual key expansion must be terminated by a virtual key`);
341
+ static ERROR_CharacterExpansionMustBeFollowedByCharacter = SevError | 0x066;
342
+ static Error_CharacterExpansionMustBeFollowedByCharacter = () => m(this.ERROR_CharacterExpansionMustBeFollowedByCharacter, `A character expansion must be terminated by a character key`);
343
+ static ERROR_VKeyExpansionMustUseConsistentShift = SevError | 0x067;
344
+ static Error_VKeyExpansionMustUseConsistentShift = () => m(this.ERROR_VKeyExpansionMustUseConsistentShift, `A virtual key expansion must use the same shift state for both terminators`);
345
+ static ERROR_ExpansionMustBePositive = SevError | 0x068;
346
+ static Error_ExpansionMustBePositive = () => m(this.ERROR_ExpansionMustBePositive, `An expansion must have positive difference (i.e. A-Z, not Z-A)`);
347
+ static ERROR_CasedKeysMustContainOnlyVirtualKeys = SevError | 0x069;
348
+ static Error_CasedKeysMustContainOnlyVirtualKeys = () => m(this.ERROR_CasedKeysMustContainOnlyVirtualKeys, `The &CasedKeys system store must contain only virtual keys or characters found on a US English keyboard`);
349
+ static ERROR_CasedKeysMustNotIncludeShiftStates = SevError | 0x06A;
350
+ static Error_CasedKeysMustNotIncludeShiftStates = () => m(this.ERROR_CasedKeysMustNotIncludeShiftStates, `The &CasedKeys system store must not include shift states`);
351
+ static ERROR_CasedKeysNotSupportedWithMnemonicLayout = SevError | 0x06B;
352
+ static Error_CasedKeysNotSupportedWithMnemonicLayout = () => m(this.ERROR_CasedKeysNotSupportedWithMnemonicLayout, `The &CasedKeys system store is not supported with mnemonic layouts`);
353
+ static ERROR_CannotUseReadWriteGroupFromReadonlyGroup = SevError | 0x06C;
354
+ static Error_CannotUseReadWriteGroupFromReadonlyGroup = () => m(this.ERROR_CannotUseReadWriteGroupFromReadonlyGroup, `Group used from a readonly group must also be readonly`);
355
+ static ERROR_StatementNotPermittedInReadonlyGroup = SevError | 0x06D;
356
+ static Error_StatementNotPermittedInReadonlyGroup = () => m(this.ERROR_StatementNotPermittedInReadonlyGroup, `Statement is not permitted in output of readonly group`);
357
+ static ERROR_OutputInReadonlyGroup = SevError | 0x06E;
358
+ static Error_OutputInReadonlyGroup = () => m(this.ERROR_OutputInReadonlyGroup, `Output is not permitted in a readonly group`);
359
+ static ERROR_NewContextGroupMustBeReadonly = SevError | 0x06F;
360
+ static Error_NewContextGroupMustBeReadonly = () => m(this.ERROR_NewContextGroupMustBeReadonly, `Group used in begin newContext must be readonly`);
361
+ static ERROR_PostKeystrokeGroupMustBeReadonly = SevError | 0x070;
362
+ static Error_PostKeystrokeGroupMustBeReadonly = () => m(this.ERROR_PostKeystrokeGroupMustBeReadonly, `Group used in begin postKeystroke must be readonly`);
363
+ static ERROR_DuplicateGroup = SevError | 0x071;
364
+ static Error_DuplicateGroup = () => m(this.ERROR_DuplicateGroup, `A group with this name has already been defined.`);
365
+ static ERROR_DuplicateStore = SevError | 0x072;
366
+ static Error_DuplicateStore = () => m(this.ERROR_DuplicateStore, `A store with this name has already been defined.`);
367
+ static ERROR_RepeatedBegin = SevError | 0x073;
368
+ static Error_RepeatedBegin = () => m(this.ERROR_RepeatedBegin, `Begin has already been set`);
369
+ static ERROR_VirtualKeyInContext = SevError | 0x074;
370
+ static Error_VirtualKeyInContext = () => m(this.ERROR_VirtualKeyInContext, `Virtual keys are not permitted in context`);
371
+ static ERROR_OutsTooLong = SevError | 0x075;
372
+ static Error_OutsTooLong = () => m(this.ERROR_OutsTooLong, `Store cannot be inserted with outs() as it makes the extended string too long`);
373
+ static ERROR_ExtendedStringTooLong = SevError | 0x076;
374
+ static Error_ExtendedStringTooLong = () => m(this.ERROR_ExtendedStringTooLong, `Extended string is too long`);
375
+ static ERROR_VirtualKeyExpansionTooLong = SevError | 0x077;
376
+ static Error_VirtualKeyExpansionTooLong = () => m(this.ERROR_VirtualKeyExpansionTooLong, `Virtual key expansion is too large`);
377
+ static ERROR_CharacterRangeTooLong = SevError | 0x078;
378
+ static Error_CharacterRangeTooLong = () => m(this.ERROR_CharacterRangeTooLong, `Character range is too large and cannot be expanded`);
379
+ static WARN_TooManyWarnings = SevWarn | 0x080;
380
+ static Warn_TooManyWarnings = () => m(this.WARN_TooManyWarnings, `Too many warnings or errors`);
381
+ static WARN_OldVersion = SevWarn | 0x081;
382
+ static Warn_OldVersion = () => m(this.WARN_OldVersion, `The keyboard file is an old version`);
383
+ static WARN_BitmapNotUsed = SevWarn | 0x082;
384
+ static Warn_BitmapNotUsed = () => m(this.WARN_BitmapNotUsed, `The 'bitmaps' statement is obsolete and only the first bitmap referred to will be used, you should use 'bitmap'.`);
385
+ static WARN_CustomLanguagesNotSupported = SevWarn | 0x083;
386
+ static Warn_CustomLanguagesNotSupported = () => m(this.WARN_CustomLanguagesNotSupported, `Languages over 0x1FF, 0x1F are not supported correctly by Windows. You should use no LANGUAGE line instead.`);
387
+ static WARN_KeyBadLength = SevWarn | 0x084;
388
+ static Warn_KeyBadLength = () => m(this.WARN_KeyBadLength, `There are too many characters in the keystroke part of the rule.`);
389
+ static WARN_IndexStoreShort = SevWarn | 0x085;
390
+ static Warn_IndexStoreShort = () => m(this.WARN_IndexStoreShort, `The store referenced in index() is shorter than the store referenced in any()`);
391
+ static WARN_UnicodeInANSIGroup = SevWarn | 0x086;
392
+ static Warn_UnicodeInANSIGroup = () => m(this.WARN_UnicodeInANSIGroup, `A Unicode character was found in an ANSI group`);
393
+ static WARN_ANSIInUnicodeGroup = SevWarn | 0x087;
394
+ static Warn_ANSIInUnicodeGroup = () => m(this.WARN_ANSIInUnicodeGroup, `An ANSI character was found in a Unicode group`);
395
+ static WARN_UnicodeSurrogateUsed = SevWarn | 0x088;
396
+ static Warn_UnicodeSurrogateUsed = () => m(this.WARN_UnicodeSurrogateUsed, `A Unicode surrogate character was found. You should use Unicode scalar values to represent values > U+FFFF`);
397
+ static WARN_ReservedCharacter = SevWarn | 0x089;
398
+ static Warn_ReservedCharacter = () => m(this.WARN_ReservedCharacter, `A Unicode character was found that should not be used`);
399
+ // Note: INFO_Info is called CWARN_Info in kmn_compiler_errors.h, but should have an "info" severity
400
+ static INFO_Info = SevInfo | 0x08A;
401
+ static Info_Info = () => m(this.INFO_Info, `Information`);
402
+ static WARN_VirtualKeyWithMnemonicLayout = SevWarn | 0x08B;
403
+ static Warn_VirtualKeyWithMnemonicLayout = () => m(this.WARN_VirtualKeyWithMnemonicLayout, `Virtual key used instead of virtual character key with a mnemonic layout`);
404
+ static WARN_VirtualCharKeyWithPositionalLayout = SevWarn | 0x08C;
405
+ static Warn_VirtualCharKeyWithPositionalLayout = () => m(this.WARN_VirtualCharKeyWithPositionalLayout, `Virtual character key used with a positional layout instead of mnemonic layout`);
406
+ static WARN_StoreAlreadyUsedAsOptionOrCall = SevWarn | 0x08D;
407
+ static Warn_StoreAlreadyUsedAsOptionOrCall = () => m(this.WARN_StoreAlreadyUsedAsOptionOrCall, `Store already used as an option or in a call statement and should not be used as a normal store`);
408
+ static WARN_StoreAlreadyUsedAsStoreOrCall = SevWarn | 0x08E;
409
+ static Warn_StoreAlreadyUsedAsStoreOrCall = () => m(this.WARN_StoreAlreadyUsedAsStoreOrCall, `Store already used as a normal store or in a call statement and should not be used as an option`);
410
+ static WARN_StoreAlreadyUsedAsStoreOrOption = SevWarn | 0x08F;
411
+ static Warn_StoreAlreadyUsedAsStoreOrOption = () => m(this.WARN_StoreAlreadyUsedAsStoreOrOption, `Store already used as a normal store or as an option and should not be used in a call statement`);
412
+ static WARN_PunctuationInEthnologueCode = SevWarn | 0x090;
413
+ static Warn_PunctuationInEthnologueCode = () => m(this.WARN_PunctuationInEthnologueCode, `Punctuation should not be used to separate Ethnologue codes; instead use spaces`);
414
+ static WARN_TouchLayoutMissingLayer = SevWarn | 0x091;
415
+ static Warn_TouchLayoutMissingLayer = (o) => mw(this.WARN_TouchLayoutMissingLayer, `Key "${def(o.keyId)}" on platform "${def(o.platformName)}", layer "${def(o.layerId)}", references a missing layer "${def(o.nextLayer)}"`);
416
+ static WARN_TouchLayoutCustomKeyNotDefined = SevWarn | 0x092;
417
+ static Warn_TouchLayoutCustomKeyNotDefined = (o) => mw(this.WARN_TouchLayoutCustomKeyNotDefined, `Key "${def(o.keyId)}" on platform "${def(o.platformName)}", layer "${def(o.layerId)}", is a custom key but has no corresponding rule in the source.`);
418
+ static WARN_TouchLayoutMissingRequiredKeys = SevWarn | 0x093;
419
+ static Warn_TouchLayoutMissingRequiredKeys = (o) => mw(this.WARN_TouchLayoutMissingRequiredKeys, `Layer "${def(o.layerId)}" on platform "${def(o.platformName)}" is missing the required key(s) '${def(o.missingKeys)}'.`);
420
+ static WARN_HelpFileMissing = SevWarn | 0x094;
421
+ static Warn_HelpFileMissing = (o) => mw(this.WARN_HelpFileMissing, `File ${def(o.helpFilename)} could not be loaded: ${(o.e ?? '').toString()}`, o);
422
+ static WARN_EmbedJsFileMissing = SevWarn | 0x095;
423
+ static Warn_EmbedJsFileMissing = (o) => mw(this.WARN_EmbedJsFileMissing, `File ${def(o.jsFilename)} could not be loaded: ${(o.e ?? '').toString()}`, o);
424
+ // static WARN_TouchLayoutFileMissing = SevWarn | 0x096;
425
+ // static WARN_VisualKeyboardFileMissing = SevWarn | 0x097;
426
+ static WARN_ExtendedShiftFlagsNotSupportedInKeymanWeb = SevWarn | 0x098;
427
+ static Warn_ExtendedShiftFlagsNotSupportedInKeymanWeb = (o) => mw(this.WARN_ExtendedShiftFlagsNotSupportedInKeymanWeb, `Extended shift flags ${def(o.flags)} are not supported in KeymanWeb`, o);
428
+ static WARN_TouchLayoutUnidentifiedKey = SevWarn | 0x099;
429
+ static Warn_TouchLayoutUnidentifiedKey = (o) => mw(this.WARN_TouchLayoutUnidentifiedKey, `A key on layer "${def(o.layerId)}" has no identifier.`);
430
+ static HINT_UnreachableKeyCode = SevHint | 0x09A;
431
+ 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);
432
+ // static WARN_CouldNotCopyJsonFile = SevWarn | 0x09B;
433
+ static WARN_PlatformNotInTargets = SevWarn | 0x09C;
434
+ static Warn_PlatformNotInTargets = () => m(this.WARN_PlatformNotInTargets, `The specified platform is not a target platform`);
435
+ static WARN_HeaderStatementIsDeprecated = SevWarn | 0x09D;
436
+ static Warn_HeaderStatementIsDeprecated = () => m(this.WARN_HeaderStatementIsDeprecated, `Header statements are deprecated; use instead the equivalent system store`);
437
+ static WARN_UseNotLastStatementInRule = SevWarn | 0x09E;
438
+ static Warn_UseNotLastStatementInRule = () => m(this.WARN_UseNotLastStatementInRule, `A rule with use() statements in the output should not have other content following the use() statements`);
439
+ static WARN_TouchLayoutFontShouldBeSameForAllPlatforms = SevWarn | 0x09F;
440
+ static Warn_TouchLayoutFontShouldBeSameForAllPlatforms = () => mw(this.WARN_TouchLayoutFontShouldBeSameForAllPlatforms, `The touch layout font should be the same for all platforms.`);
441
+ // static WARN_InvalidJSONMetadataFile = SevWarn | 0x0A0;
442
+ // static WARN_JSONMetadataOSKFontShouldMatchTouchFont = SevWarn | 0x0A1;
443
+ static WARN_KVKFileIsInSourceFormat = SevWarn | 0x0A2;
444
+ static Warn_KVKFileIsInSourceFormat = () => m(this.WARN_KVKFileIsInSourceFormat, `.kvk file should be binary but is an XML file`);
445
+ // 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`);
446
+ static WARN_DontMixChiralAndNonChiralModifiers = SevWarn | 0x0A3;
447
+ 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.`);
448
+ static WARN_MixingLeftAndRightModifiers = SevWarn | 0x0A4;
449
+ static Warn_MixingLeftAndRightModifiers = () => m(this.WARN_MixingLeftAndRightModifiers, `Left and right modifiers should not both be used in the same rule`);
450
+ static WARN_LanguageHeadersDeprecatedInKeyman10 = SevWarn | 0x0A5;
451
+ static Warn_LanguageHeadersDeprecatedInKeyman10 = () => m(this.WARN_LanguageHeadersDeprecatedInKeyman10, `This language header has been deprecated in Keyman 10. Instead, add language metadata in the package file`);
452
+ static HINT_NonUnicodeFile = SevHint | 0x0A6;
453
+ static Hint_NonUnicodeFile = () => m(this.HINT_NonUnicodeFile, `Keyman Developer has detected that the file has ANSI encoding. Consider converting this file to UTF-8`);
454
+ // static WARN_TooManyErrorsOrWarnings = SevWarn | 0x0A7;
455
+ static WARN_HotkeyHasInvalidModifier = SevWarn | 0x0A8;
456
+ static Warn_HotkeyHasInvalidModifier = () => m(this.WARN_HotkeyHasInvalidModifier, `Hotkey has modifiers that are not supported. Use only SHIFT, CTRL and ALT`);
457
+ static WARN_TouchLayoutSpecialLabelOnNormalKey = SevWarn | 0x0A9;
458
+ static Warn_TouchLayoutSpecialLabelOnNormalKey = (o) => mw(this.WARN_TouchLayoutSpecialLabelOnNormalKey, `Key "${def(o.keyId)}" on platform "${def(o.platformName)}", layer "${def(o.layerId)}" does not have ` +
459
+ `the key type "Special" or "Special (active)" but has the label "${def(o.label)}". This feature is only supported in Keyman 14 or later`);
460
+ static WARN_OptionStoreNameInvalid = SevWarn | 0x0AA;
461
+ 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.`);
462
+ static WARN_NulNotFirstStatementInContext = SevWarn | 0x0AB;
463
+ static Warn_NulNotFirstStatementInContext = () => m(this.WARN_NulNotFirstStatementInContext, `nul must be the first statement in the context`);
464
+ static WARN_IfShouldBeAtStartOfContext = SevWarn | 0x0AC;
465
+ static Warn_IfShouldBeAtStartOfContext = () => m(this.WARN_IfShouldBeAtStartOfContext, `if, platform and baselayout should be at start of context (after nul, if present)`);
466
+ static WARN_KeyShouldIncludeNCaps = SevWarn | 0x0AD;
467
+ static Warn_KeyShouldIncludeNCaps = () => m(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`);
468
+ static HINT_UnreachableRule = SevHint | 0x0AE;
469
+ static Hint_UnreachableRule = () => m(this.HINT_UnreachableRule, `This rule will never be matched as another rule takes precedence`);
470
+ static WARN_VirtualKeyInOutput = SevWarn | 0x0AF;
471
+ static Warn_VirtualKeyInOutput = () => m(this.WARN_VirtualKeyInOutput, `Virtual keys are not supported in output`);
472
+ static FATAL_BufferOverflow = SevFatal | 0x0C0;
473
+ static Fatal_BufferOverflow = () => m(this.FATAL_BufferOverflow, `The compiler memory buffer overflowed`);
474
+ static FATAL_Break = SevFatal | 0x0C1;
475
+ static Fatal_Break = () => m(this.FATAL_Break, `Compiler interrupted by user`);
476
+ }
477
+ ;
478
+ /**
479
+ * @internal
480
+ * TODO: This class is here as a stopgap as we merged it with
481
+ * KmnCompilerMessages. It should be removed in v18.0.
482
+ */
483
+ export class CompilerMessages extends KmnCompilerMessages {
484
+ }
485
+ export function mapErrorFromKmcmplib(line, code, msg) {
486
+ const severity = LogLevelToSeverity[code & 61440 /* LogLevel.LEVEL_MASK */];
487
+ const baseCode = code & 4095 /* LogLevel.CODE_MASK */;
488
+ const event = {
489
+ line: line,
490
+ code: severity | CompilerErrorNamespace.KmnCompiler | baseCode,
491
+ message: msg
492
+ };
493
+ return event;
494
+ }
495
+ ;
496
+ //# sourceMappingURL=kmn-compiler-messages.js.map