@keymanapp/kmc-ldml 17.0.154-alpha → 17.0.156-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/compiler.d.ts +57 -55
- package/build/src/compiler/compiler.d.ts.map +1 -1
- package/build/src/compiler/compiler.js +198 -198
- package/build/src/compiler/compiler.js.map +1 -1
- package/build/src/compiler/disp.d.ts +14 -12
- package/build/src/compiler/disp.d.ts.map +1 -1
- package/build/src/compiler/disp.js +45 -43
- package/build/src/compiler/disp.js.map +1 -1
- package/build/src/compiler/empty-compiler.d.ts +39 -37
- package/build/src/compiler/empty-compiler.d.ts.map +1 -1
- package/build/src/compiler/empty-compiler.js +71 -69
- package/build/src/compiler/empty-compiler.js.map +1 -1
- package/build/src/compiler/keymanweb-compiler.d.ts +16 -16
- package/build/src/compiler/keymanweb-compiler.d.ts.map +1 -1
- package/build/src/compiler/keymanweb-compiler.js +97 -96
- package/build/src/compiler/keymanweb-compiler.js.map +1 -1
- package/build/src/compiler/keys.d.ts +30 -28
- package/build/src/compiler/keys.d.ts.map +1 -1
- package/build/src/compiler/keys.js +240 -238
- package/build/src/compiler/keys.js.map +1 -1
- package/build/src/compiler/layr.d.ts +12 -10
- package/build/src/compiler/layr.d.ts.map +1 -1
- package/build/src/compiler/layr.js +83 -81
- package/build/src/compiler/layr.js.map +1 -1
- package/build/src/compiler/ldml-compiler-options.d.ts +10 -0
- package/build/src/compiler/ldml-compiler-options.d.ts.map +1 -0
- package/build/src/compiler/ldml-compiler-options.js +5 -0
- package/build/src/compiler/ldml-compiler-options.js.map +1 -0
- package/build/src/compiler/loca.d.ts +18 -16
- package/build/src/compiler/loca.d.ts.map +1 -1
- package/build/src/compiler/loca.js +61 -59
- package/build/src/compiler/loca.js.map +1 -1
- package/build/src/compiler/marker-tracker.d.ts +36 -34
- package/build/src/compiler/marker-tracker.d.ts.map +1 -1
- package/build/src/compiler/marker-tracker.js +75 -73
- package/build/src/compiler/marker-tracker.js.map +1 -1
- package/build/src/compiler/messages.d.ts +135 -133
- package/build/src/compiler/messages.d.ts.map +1 -1
- package/build/src/compiler/messages.js +79 -77
- package/build/src/compiler/messages.js.map +1 -1
- package/build/src/compiler/meta.d.ts +14 -12
- package/build/src/compiler/meta.d.ts.map +1 -1
- package/build/src/compiler/meta.js +60 -58
- package/build/src/compiler/meta.js.map +1 -1
- package/build/src/compiler/metadata-compiler.d.ts +15 -13
- package/build/src/compiler/metadata-compiler.d.ts.map +1 -1
- package/build/src/compiler/metadata-compiler.js +49 -47
- package/build/src/compiler/metadata-compiler.js.map +1 -1
- package/build/src/compiler/name.d.ts +12 -10
- package/build/src/compiler/name.d.ts.map +1 -1
- package/build/src/compiler/name.js +22 -20
- package/build/src/compiler/name.js.map +1 -1
- package/build/src/compiler/section-compiler.d.ts +18 -16
- package/build/src/compiler/section-compiler.d.ts.map +1 -1
- package/build/src/compiler/section-compiler.js +36 -34
- package/build/src/compiler/section-compiler.js.map +1 -1
- package/build/src/compiler/touch-layout-compiler.d.ts +10 -8
- package/build/src/compiler/touch-layout-compiler.d.ts.map +1 -1
- package/build/src/compiler/touch-layout-compiler.js +89 -87
- package/build/src/compiler/touch-layout-compiler.js.map +1 -1
- package/build/src/compiler/tran.d.ts +39 -37
- package/build/src/compiler/tran.d.ts.map +1 -1
- package/build/src/compiler/tran.js +187 -185
- package/build/src/compiler/tran.js.map +1 -1
- package/build/src/compiler/vars.d.ts +23 -21
- package/build/src/compiler/vars.d.ts.map +1 -1
- package/build/src/compiler/vars.js +221 -219
- package/build/src/compiler/vars.js.map +1 -1
- package/build/src/compiler/visual-keyboard-compiler.d.ts +9 -7
- package/build/src/compiler/visual-keyboard-compiler.d.ts.map +1 -1
- package/build/src/compiler/visual-keyboard-compiler.js +52 -54
- package/build/src/compiler/visual-keyboard-compiler.js.map +1 -1
- package/build/src/compiler/vkey.d.ts +11 -9
- package/build/src/compiler/vkey.d.ts.map +1 -1
- package/build/src/compiler/vkey.js +61 -59
- package/build/src/compiler/vkey.js.map +1 -1
- package/build/src/main.d.ts +11 -9
- package/build/src/main.d.ts.map +1 -1
- package/build/src/main.js +10 -8
- package/build/src/main.js.map +1 -1
- package/build/src/util/util.d.ts +44 -42
- package/build/src/util/util.d.ts.map +1 -1
- package/build/src/util/util.js +122 -120
- package/build/src/util/util.js.map +1 -1
- package/package.json +8 -8
- package/build/src/compiler/compiler-options.d.ts +0 -16
- package/build/src/compiler/compiler-options.d.ts.map +0 -1
- package/build/src/compiler/compiler-options.js +0 -6
- package/build/src/compiler/compiler-options.js.map +0 -1
- package/build/src/kpj.schema.json +0 -127
- package/build/src/kvks.schema.json +0 -182
- package/build/src/ldml-keyboard.schema.json +0 -702
- package/build/src/ldml-keyboardtest.schema.json +0 -221
|
@@ -1,185 +1,187 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
mt.add(MarkerUse.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
let
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
// TODO-LDML:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
let
|
|
100
|
-
let
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
result.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
result.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
result.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
result
|
|
135
|
-
result.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
constants.section.
|
|
151
|
-
constants.section.
|
|
152
|
-
constants.section.
|
|
153
|
-
constants.section.
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
|
|
1
|
+
!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]="307f771f-2150-5dda-af62-41853d85e0ed")}catch(e){}}();
|
|
2
|
+
import { constants } from "@keymanapp/ldml-keyboard-constants";
|
|
3
|
+
import { KMXPlus, VariableParser, MarkerParser } from '@keymanapp/common-types';
|
|
4
|
+
import { SectionCompiler } from "./section-compiler.js";
|
|
5
|
+
var Bksp = KMXPlus.Bksp;
|
|
6
|
+
var Tran = KMXPlus.Tran;
|
|
7
|
+
var TranReorder = KMXPlus.TranReorder;
|
|
8
|
+
var TranTransform = KMXPlus.TranTransform;
|
|
9
|
+
import { verifyValidAndUnique } from "../util/util.js";
|
|
10
|
+
import { CompilerMessages } from "./messages.js";
|
|
11
|
+
import { MarkerUse } from "./marker-tracker.js";
|
|
12
|
+
export class TransformCompiler extends SectionCompiler {
|
|
13
|
+
static validateMarkers(keyboard, mt) {
|
|
14
|
+
keyboard?.transforms?.forEach(transforms => transforms.transformGroup.forEach(transformGroup => {
|
|
15
|
+
transformGroup.transform?.forEach(({ to, from }) => {
|
|
16
|
+
mt.add(MarkerUse.emit, MarkerParser.allReferences(to));
|
|
17
|
+
mt.add(MarkerUse.consume, MarkerParser.allReferences(from));
|
|
18
|
+
});
|
|
19
|
+
}));
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
type;
|
|
23
|
+
constructor(source, callbacks) {
|
|
24
|
+
super(source, callbacks);
|
|
25
|
+
}
|
|
26
|
+
validate() {
|
|
27
|
+
const reportMessage = this.callbacks.reportMessage.bind(this.callbacks);
|
|
28
|
+
let valid = true;
|
|
29
|
+
const transforms = this?.keyboard?.transforms;
|
|
30
|
+
if (transforms) {
|
|
31
|
+
const types = transforms.map(({ type }) => type);
|
|
32
|
+
if (!verifyValidAndUnique(types, types => reportMessage(CompilerMessages.Error_DuplicateTransformsType({ types })), new Set(['simple', 'backspace']), types => reportMessage(CompilerMessages.Error_InvalidTransformsType({ types })))) {
|
|
33
|
+
valid = false;
|
|
34
|
+
}
|
|
35
|
+
// check for mixed groups
|
|
36
|
+
let mixed = false;
|
|
37
|
+
let empty = false;
|
|
38
|
+
transforms.forEach(({ transformGroup }) => transformGroup.forEach((transformGroup) => {
|
|
39
|
+
if (transformGroup.reorder?.length && transformGroup.transform?.length) {
|
|
40
|
+
mixed = true;
|
|
41
|
+
}
|
|
42
|
+
if (!transformGroup.reorder?.length && !transformGroup.transform?.length) {
|
|
43
|
+
empty = true;
|
|
44
|
+
}
|
|
45
|
+
}));
|
|
46
|
+
if (mixed) {
|
|
47
|
+
valid = false;
|
|
48
|
+
reportMessage(CompilerMessages.Error_MixedTransformGroup()); // report this once
|
|
49
|
+
}
|
|
50
|
+
if (empty) {
|
|
51
|
+
valid = false;
|
|
52
|
+
reportMessage(CompilerMessages.Error_EmptyTransformGroup()); // report this once
|
|
53
|
+
}
|
|
54
|
+
// TODO-LDML: linting here should check for identical from, but this involves a double-parse which is ugly
|
|
55
|
+
// TODO-LDML: unicodesets means that either we fully parse them and verify conflicting rules or the linting is imperfect
|
|
56
|
+
}
|
|
57
|
+
return valid;
|
|
58
|
+
}
|
|
59
|
+
/* c8 ignore next 4 */
|
|
60
|
+
/** allocate a new TranBase subclass */
|
|
61
|
+
newTran() {
|
|
62
|
+
throw Error(`Internal Error: newTran() not implemented`);
|
|
63
|
+
}
|
|
64
|
+
compileTransforms(sections, transforms) {
|
|
65
|
+
let result = this.newTran();
|
|
66
|
+
if (transforms?.transformGroup) {
|
|
67
|
+
for (let transformGroup of transforms.transformGroup) {
|
|
68
|
+
result.groups.push(this.compileTransformGroup(sections, transformGroup));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return result;
|
|
72
|
+
}
|
|
73
|
+
compileTransformGroup(sections, transformGroup) {
|
|
74
|
+
if (transformGroup.reorder.length && transformGroup.transform.length) {
|
|
75
|
+
/* c8 ignore next 2 */
|
|
76
|
+
// should have been caught by validate
|
|
77
|
+
throw Error(`Internal error: transformGroup has both reorder and transform elements.`);
|
|
78
|
+
}
|
|
79
|
+
else if (transformGroup.reorder.length) {
|
|
80
|
+
return this.compileReorderTranGroup(sections, transformGroup.reorder);
|
|
81
|
+
}
|
|
82
|
+
else if (transformGroup.transform.length) {
|
|
83
|
+
return this.compileTransformTranGroup(sections, transformGroup.transform);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
/* c8 ignore next */
|
|
87
|
+
throw Error(`Internal error: transformGroup has neither reorder nor transform elements.`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
compileTransformTranGroup(sections, transforms) {
|
|
91
|
+
const result = {
|
|
92
|
+
type: constants.tran_group_type_transform,
|
|
93
|
+
transforms: transforms.map(transform => this.compileTransform(sections, transform)),
|
|
94
|
+
reorders: [],
|
|
95
|
+
};
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
|
+
compileTransform(sections, transform) {
|
|
99
|
+
let result = new TranTransform();
|
|
100
|
+
let cookedFrom = transform.from;
|
|
101
|
+
let cookedTo = transform.to;
|
|
102
|
+
cookedFrom = sections.vars.substituteStrings(cookedFrom, sections);
|
|
103
|
+
// TODO: handle 'map' case
|
|
104
|
+
const mapFrom = VariableParser.CAPTURE_SET_REFERENCE.exec(cookedFrom);
|
|
105
|
+
const mapTo = VariableParser.MAPPED_SET_REFERENCE.exec(cookedTo || '');
|
|
106
|
+
if (mapFrom && mapTo) { // TODO-LDML: error cases
|
|
107
|
+
result.mapFrom = sections.strs.allocString(mapFrom[1]); // var name
|
|
108
|
+
result.mapTo = sections.strs.allocString(mapTo[1]); // var name
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
result.mapFrom = sections.strs.allocString(''); // TODO-LDML
|
|
112
|
+
result.mapTo = sections.strs.allocString(''); // TODO-LDML
|
|
113
|
+
}
|
|
114
|
+
cookedFrom = sections.vars.substituteSetRegex(cookedFrom, sections);
|
|
115
|
+
if (cookedTo) {
|
|
116
|
+
cookedTo = sections.vars.substituteStrings(cookedTo, sections);
|
|
117
|
+
}
|
|
118
|
+
// add in markers. idempotent if no markers.
|
|
119
|
+
cookedFrom = sections.vars.substituteMarkerString(cookedFrom); // TODO-LDML: need to support \m{.} here, maybe other edge cases
|
|
120
|
+
cookedTo = sections.vars.substituteMarkerString(cookedTo);
|
|
121
|
+
result.from = sections.strs.allocAndUnescapeString(cookedFrom); // TODO-LDML: not unescaped here, done previously
|
|
122
|
+
result.to = sections.strs.allocAndUnescapeString(cookedTo); // TODO-LDML: not unescaped here, done previously
|
|
123
|
+
return result;
|
|
124
|
+
}
|
|
125
|
+
compileReorderTranGroup(sections, reorders) {
|
|
126
|
+
const result = {
|
|
127
|
+
type: constants.tran_group_type_reorder,
|
|
128
|
+
transforms: [],
|
|
129
|
+
reorders: reorders.map(reorder => this.compileReorder(sections, reorder)),
|
|
130
|
+
};
|
|
131
|
+
return result;
|
|
132
|
+
}
|
|
133
|
+
compileReorder(sections, reorder) {
|
|
134
|
+
let result = new TranReorder();
|
|
135
|
+
result.elements = sections.elem.allocElementString(sections, reorder.from, reorder.order, reorder.tertiary, reorder.tertiaryBase, reorder.preBase);
|
|
136
|
+
result.before = sections.elem.allocElementString(sections, reorder.before);
|
|
137
|
+
return result;
|
|
138
|
+
}
|
|
139
|
+
compile(sections) {
|
|
140
|
+
for (let t of this.keyboard.transforms) {
|
|
141
|
+
if (t.type == this.type) {
|
|
142
|
+
// compile only the transforms of the correct type
|
|
143
|
+
return this.compileTransforms(sections, t);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return this.newTran(); // empty: nothing of this type found.
|
|
147
|
+
}
|
|
148
|
+
get dependencies() {
|
|
149
|
+
const defaults = new Set([
|
|
150
|
+
constants.section.strs,
|
|
151
|
+
constants.section.list,
|
|
152
|
+
constants.section.elem,
|
|
153
|
+
constants.section.vars,
|
|
154
|
+
constants.section.uset,
|
|
155
|
+
]);
|
|
156
|
+
defaults.delete(this.id);
|
|
157
|
+
return defaults;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
export class TranCompiler extends TransformCompiler {
|
|
161
|
+
constructor(source, callbacks) {
|
|
162
|
+
super(source, callbacks);
|
|
163
|
+
this.type = 'simple';
|
|
164
|
+
}
|
|
165
|
+
newTran() {
|
|
166
|
+
return new Tran();
|
|
167
|
+
}
|
|
168
|
+
get id() {
|
|
169
|
+
return constants.section.tran;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
;
|
|
173
|
+
export class BkspCompiler extends TransformCompiler {
|
|
174
|
+
constructor(source, callbacks) {
|
|
175
|
+
super(source, callbacks);
|
|
176
|
+
this.type = 'backspace';
|
|
177
|
+
}
|
|
178
|
+
newTran() {
|
|
179
|
+
return new Bksp();
|
|
180
|
+
}
|
|
181
|
+
get id() {
|
|
182
|
+
return constants.section.bksp;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
;
|
|
186
|
+
//# debugId=307f771f-2150-5dda-af62-41853d85e0ed
|
|
187
|
+
//# sourceMappingURL=tran.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"307f771f-2150-5dda-af62-41853d85e0ed","file":"tran.js","mappings":";AAAA,OAAO,EAAE,SAAS,EAAgB,MAAM,oCAAoC,CAAC;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,YAAa,SAAQ,iBAAmD;IACnF,YAAY,MAAiC,EAAE,SAA4B;QACzE,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IAC1B,CAAC;IACS,OAAO;QACf,OAAO,IAAI,IAAI,EAAE,CAAC;IACpB,CAAC;IACD,IAAW,EAAE;QACX,OAAO,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;IAChC,CAAC;CACF;AAAA,CAAC","names":[],"sourceRoot":"","sources":["../../../src/compiler/tran.ts"],"version":3}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
get
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
private
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
!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]="d96b7628-7077-5e32-a0ea-cd2ff841db08")}catch(e){}}();
|
|
2
|
+
import { SectionIdent } from "@keymanapp/ldml-keyboard-constants";
|
|
3
|
+
import { KMXPlus, LDMLKeyboard, CompilerCallbacks } from '@keymanapp/common-types';
|
|
4
|
+
import { SectionCompiler } from "./section-compiler.js";
|
|
5
|
+
import Vars = KMXPlus.Vars;
|
|
6
|
+
import DependencySections = KMXPlus.DependencySections;
|
|
7
|
+
import LDMLKeyboardXMLSourceFile = LDMLKeyboard.LDMLKeyboardXMLSourceFile;
|
|
8
|
+
import { MarkerTracker } from "./marker-tracker.js";
|
|
9
|
+
export declare class VarsCompiler extends SectionCompiler {
|
|
10
|
+
get id(): SectionIdent;
|
|
11
|
+
get dependencies(): Set<SectionIdent>;
|
|
12
|
+
constructor(source: LDMLKeyboardXMLSourceFile, callbacks: CompilerCallbacks);
|
|
13
|
+
validate(): boolean;
|
|
14
|
+
private collectMarkers;
|
|
15
|
+
private validateMarkers;
|
|
16
|
+
validateVarsMarkers(keyboard: LDMLKeyboard.LKKeyboard, mt: MarkerTracker): boolean;
|
|
17
|
+
compile(sections: DependencySections): Vars;
|
|
18
|
+
addString(result: Vars, e: LDMLKeyboard.LKString, sections: DependencySections): void;
|
|
19
|
+
addSet(result: Vars, e: LDMLKeyboard.LKSet, sections: DependencySections): void;
|
|
20
|
+
addUnicodeSet(result: Vars, e: LDMLKeyboard.LKUnicodeSet, sections: DependencySections): void;
|
|
21
|
+
}
|
|
22
|
+
//# debugId=d96b7628-7077-5e32-a0ea-cd2ff841db08
|
|
23
|
+
//# sourceMappingURL=vars.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"d96b7628-7077-5e32-a0ea-cd2ff841db08","file":"vars.d.ts","mappings":";AAAA,OAAO,EAAE,YAAY,EAAa,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAgB,MAAM,yBAAyB,CAAC;AAEjG,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAI3B,OAAO,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;AACvD,OAAO,yBAAyB,GAAG,YAAY,CAAC,yBAAyB,CAAC;AAK1E,OAAO,EAAE,aAAa,EAAa,MAAM,qBAAqB,CAAC;AAC/D,qBAAa,YAAa,SAAQ,eAAe;IAC/C,IAAW,EAAE,iBAEZ;IAED,IAAW,YAAY,IAAI,GAAG,CAAC,YAAY,CAAC,CAQ3C;gBAEW,MAAM,EAAE,yBAAyB,EAAE,SAAS,EAAE,iBAAiB;I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