@lewin671/python-vm 0.1.0

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 (144) hide show
  1. package/.claude/settings.local.json +3 -0
  2. package/.prettierrc +7 -0
  3. package/Agents.md +66 -0
  4. package/README.md +93 -0
  5. package/README_zh-CN.md +93 -0
  6. package/SETUP.md +171 -0
  7. package/dist/compiler.d.ts +20 -0
  8. package/dist/compiler.js +91 -0
  9. package/dist/compiler_module/compiler.d.ts +8 -0
  10. package/dist/compiler_module/compiler.js +22 -0
  11. package/dist/compiler_module/index.d.ts +2 -0
  12. package/dist/compiler_module/index.js +6 -0
  13. package/dist/index.d.ts +4 -0
  14. package/dist/index.js +67 -0
  15. package/dist/lexer/index.d.ts +2 -0
  16. package/dist/lexer/index.js +6 -0
  17. package/dist/lexer/lexer.d.ts +16 -0
  18. package/dist/lexer/lexer.js +403 -0
  19. package/dist/parser/expressions.d.ts +30 -0
  20. package/dist/parser/expressions.js +483 -0
  21. package/dist/parser/index.d.ts +2 -0
  22. package/dist/parser/index.js +6 -0
  23. package/dist/parser/parser.d.ts +63 -0
  24. package/dist/parser/parser.js +129 -0
  25. package/dist/parser/statements.d.ts +20 -0
  26. package/dist/parser/statements.js +388 -0
  27. package/dist/parser/targets.d.ts +6 -0
  28. package/dist/parser/targets.js +75 -0
  29. package/dist/types/ast.d.ts +63 -0
  30. package/dist/types/ast.js +60 -0
  31. package/dist/types/bytecode.d.ts +38 -0
  32. package/dist/types/bytecode.js +35 -0
  33. package/dist/types/index.d.ts +4 -0
  34. package/dist/types/index.js +20 -0
  35. package/dist/types/token.d.ts +34 -0
  36. package/dist/types/token.js +39 -0
  37. package/dist/vm/builtins.d.ts +4 -0
  38. package/dist/vm/builtins.js +269 -0
  39. package/dist/vm/callable.d.ts +8 -0
  40. package/dist/vm/callable.js +161 -0
  41. package/dist/vm/execution.d.ts +15 -0
  42. package/dist/vm/execution.js +283 -0
  43. package/dist/vm/expression-generator.d.ts +3 -0
  44. package/dist/vm/expression-generator.js +70 -0
  45. package/dist/vm/expressions.d.ts +13 -0
  46. package/dist/vm/expressions.js +390 -0
  47. package/dist/vm/imports.d.ts +7 -0
  48. package/dist/vm/imports.js +99 -0
  49. package/dist/vm/index.d.ts +3 -0
  50. package/dist/vm/index.js +21 -0
  51. package/dist/vm/operations.d.ts +16 -0
  52. package/dist/vm/operations.js +439 -0
  53. package/dist/vm/runtime-types.d.ts +84 -0
  54. package/dist/vm/runtime-types.js +290 -0
  55. package/dist/vm/statements.d.ts +7 -0
  56. package/dist/vm/statements.js +381 -0
  57. package/dist/vm/truthy.d.ts +4 -0
  58. package/dist/vm/truthy.js +47 -0
  59. package/dist/vm/value-utils.d.ts +28 -0
  60. package/dist/vm/value-utils.js +225 -0
  61. package/dist/vm/vm.d.ts +56 -0
  62. package/dist/vm/vm.js +75 -0
  63. package/examples/assert_testing.py +38 -0
  64. package/examples/big_int_precision.py +2 -0
  65. package/examples/boolean_logic.py +35 -0
  66. package/examples/break_continue.py +43 -0
  67. package/examples/classes_objects.py +43 -0
  68. package/examples/compiler_killer_async.py +6 -0
  69. package/examples/compiler_killer_bigint.py +3 -0
  70. package/examples/compiler_killer_bool_int_dict_key.py +5 -0
  71. package/examples/compiler_killer_bool_len.py +9 -0
  72. package/examples/compiler_killer_floor_division.py +4 -0
  73. package/examples/compiler_killer_is_identity.py +3 -0
  74. package/examples/compiler_killer_list_sort_return.py +3 -0
  75. package/examples/compiler_killer_match.py +13 -0
  76. package/examples/compiler_killer_negative_repeat.py +3 -0
  77. package/examples/compiler_killer_negative_zero_repr.py +3 -0
  78. package/examples/compiler_killer_rounding.py +4 -0
  79. package/examples/compiler_killer_slice_assign.py +3 -0
  80. package/examples/comprehensions.py +28 -0
  81. package/examples/conditions.py +13 -0
  82. package/examples/context_manager.py +35 -0
  83. package/examples/decorators.py +50 -0
  84. package/examples/exceptions.py +40 -0
  85. package/examples/fibonacci.py +10 -0
  86. package/examples/functions.py +38 -0
  87. package/examples/generator.py +51 -0
  88. package/examples/global_nonlocal.py +48 -0
  89. package/examples/hello.py +3 -0
  90. package/examples/itertools_example.py +33 -0
  91. package/examples/lists_dicts.py +29 -0
  92. package/examples/loops.py +19 -0
  93. package/examples/math_ops.py +15 -0
  94. package/examples/nan_set.py +6 -0
  95. package/examples/numbers_operators.py +51 -0
  96. package/examples/sets.py +36 -0
  97. package/examples/slicing.py +29 -0
  98. package/examples/starred_unpacking.py +3 -0
  99. package/examples/string_formatting.py +36 -0
  100. package/examples/strings.py +22 -0
  101. package/examples/tuples.py +45 -0
  102. package/examples/type_conversion.py +41 -0
  103. package/jest.config.js +15 -0
  104. package/notes/iterations/compiler-runtime/compiler-runtime_2025-09-16.md +25 -0
  105. package/notes/iterations/compiler-runtime/compiler-runtime_2026-01-16.md +24 -0
  106. package/notes/iterations/compiler-runtime/compiler-runtime_test_2026-01-16.md +21 -0
  107. package/notes/iterations/floor-division/floor-division_2026-01-16.md +29 -0
  108. package/package.json +36 -0
  109. package/prompts/commit.txt +9 -0
  110. package/prompts/task.txt +21 -0
  111. package/prompts/test.txt +23 -0
  112. package/scripts/codex-loop.js +215 -0
  113. package/scripts/verify.sh +12 -0
  114. package/src/compiler.ts +58 -0
  115. package/src/compiler_module/compiler.ts +19 -0
  116. package/src/compiler_module/index.ts +1 -0
  117. package/src/index.ts +39 -0
  118. package/src/lexer/index.ts +1 -0
  119. package/src/lexer/lexer.ts +402 -0
  120. package/src/parser/expressions.ts +462 -0
  121. package/src/parser/index.ts +1 -0
  122. package/src/parser/parser.ts +102 -0
  123. package/src/parser/statements.ts +366 -0
  124. package/src/parser/targets.ts +71 -0
  125. package/src/types/ast.ts +64 -0
  126. package/src/types/bytecode.ts +50 -0
  127. package/src/types/index.ts +3 -0
  128. package/src/types/token.ts +44 -0
  129. package/src/vm/builtins.ts +237 -0
  130. package/src/vm/callable.ts +154 -0
  131. package/src/vm/execution.ts +251 -0
  132. package/src/vm/expression-generator.ts +65 -0
  133. package/src/vm/expressions.ts +373 -0
  134. package/src/vm/imports.ts +61 -0
  135. package/src/vm/index.ts +2 -0
  136. package/src/vm/operations.ts +414 -0
  137. package/src/vm/runtime-types.ts +292 -0
  138. package/src/vm/statements.ts +358 -0
  139. package/src/vm/truthy.ts +36 -0
  140. package/src/vm/value-utils.ts +173 -0
  141. package/src/vm/vm.ts +80 -0
  142. package/tests/compiler.test.ts +111 -0
  143. package/tsconfig.json +20 -0
  144. package/vitest.config.ts +16 -0
@@ -0,0 +1,283 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ exports.executeBlock = executeBlock;
5
+ exports.iterableToArray = iterableToArray;
6
+ exports.matchValueEquals = matchValueEquals;
7
+ exports.matchPattern = matchPattern;
8
+ exports.applyBindings = applyBindings;
9
+ exports.executeBlockGenerator = executeBlockGenerator;
10
+ exports.executeStatementGenerator = executeStatementGenerator;
11
+ const types_1 = require("../types");
12
+ const runtime_types_1 = require("./runtime-types");
13
+ const runtime_types_2 = require("./runtime-types");
14
+ function execute(bytecode) {
15
+ if (!bytecode.ast) {
16
+ throw new Error('Bytecode missing AST');
17
+ }
18
+ const globalScope = new runtime_types_1.Scope();
19
+ this.installBuiltins(globalScope);
20
+ return this.executeBlock(bytecode.ast.body, globalScope);
21
+ }
22
+ function executeBlock(body, scope) {
23
+ let lastValue = null;
24
+ for (const stmt of body) {
25
+ lastValue = this.executeStatement(stmt, scope);
26
+ }
27
+ return lastValue;
28
+ }
29
+ function iterableToArray(iterable) {
30
+ if (iterable instanceof runtime_types_2.PyDict)
31
+ return Array.from(iterable.keys());
32
+ if (iterable instanceof Set)
33
+ return Array.from(iterable.values());
34
+ if (Array.isArray(iterable))
35
+ return iterable;
36
+ if (iterable && typeof iterable[Symbol.iterator] === 'function')
37
+ return Array.from(iterable);
38
+ throw new Error('Object is not iterable');
39
+ }
40
+ function matchValueEquals(left, right) {
41
+ if (Array.isArray(left) && Array.isArray(right)) {
42
+ if (left.length !== right.length)
43
+ return false;
44
+ for (let i = 0; i < left.length; i++) {
45
+ if (!matchValueEquals(left[i], right[i]))
46
+ return false;
47
+ }
48
+ return true;
49
+ }
50
+ if (left instanceof Map && right instanceof Map) {
51
+ if (left.size !== right.size)
52
+ return false;
53
+ for (const [k, v] of left.entries()) {
54
+ if (!right.has(k) || !matchValueEquals(v, right.get(k)))
55
+ return false;
56
+ }
57
+ return true;
58
+ }
59
+ return left === right;
60
+ }
61
+ function matchPattern(node, value, scope) {
62
+ switch (node.type) {
63
+ case types_1.ASTNodeType.MATCH_PATTERN_VALUE:
64
+ return { matched: matchValueEquals(value, this.evaluateExpression(node.value, scope)), bindings: new Map() };
65
+ case types_1.ASTNodeType.MATCH_PATTERN_WILDCARD:
66
+ return { matched: true, bindings: new Map() };
67
+ case types_1.ASTNodeType.MATCH_PATTERN_CAPTURE:
68
+ return { matched: true, bindings: new Map([[node.name, value]]) };
69
+ case types_1.ASTNodeType.MATCH_PATTERN_OR: {
70
+ for (const pattern of node.patterns || []) {
71
+ const result = this.matchPattern(pattern, value, scope);
72
+ if (result.matched)
73
+ return result;
74
+ }
75
+ return { matched: false, bindings: new Map() };
76
+ }
77
+ case types_1.ASTNodeType.MATCH_PATTERN_SEQUENCE: {
78
+ const elements = node.elements || node.patterns;
79
+ if (!Array.isArray(value) || !elements || elements.length !== value.length) {
80
+ return { matched: false, bindings: new Map() };
81
+ }
82
+ const bindings = new Map();
83
+ for (let i = 0; i < elements.length; i++) {
84
+ const result = this.matchPattern(elements[i], value[i], scope);
85
+ if (!result.matched)
86
+ return { matched: false, bindings: new Map() };
87
+ for (const [k, v] of result.bindings.entries())
88
+ bindings.set(k, v);
89
+ }
90
+ return { matched: true, bindings };
91
+ }
92
+ case 'MatchValue':
93
+ return { matched: matchValueEquals(value, node.value), bindings: new Map() };
94
+ case 'MatchSingleton':
95
+ return { matched: value === node.value, bindings: new Map() };
96
+ case 'MatchSequence': {
97
+ if (!Array.isArray(value))
98
+ return { matched: false, bindings: new Map() };
99
+ if (!node.patterns || node.patterns.length !== value.length)
100
+ return { matched: false, bindings: new Map() };
101
+ const bindings = new Map();
102
+ for (let i = 0; i < node.patterns.length; i++) {
103
+ const result = this.matchPattern(node.patterns[i], value[i], scope);
104
+ if (!result.matched)
105
+ return { matched: false, bindings: new Map() };
106
+ for (const [k, v] of result.bindings.entries())
107
+ bindings.set(k, v);
108
+ }
109
+ return { matched: true, bindings };
110
+ }
111
+ case 'MatchMapping': {
112
+ if (!(value instanceof runtime_types_2.PyDict))
113
+ return { matched: false, bindings: new Map() };
114
+ const bindings = new Map();
115
+ for (const { key, pattern } of node.keys) {
116
+ if (!value.has(key))
117
+ return { matched: false, bindings: new Map() };
118
+ const result = this.matchPattern(pattern, value.get(key), scope);
119
+ if (!result.matched)
120
+ return { matched: false, bindings: new Map() };
121
+ for (const [k, v] of result.bindings.entries())
122
+ bindings.set(k, v);
123
+ }
124
+ return { matched: true, bindings };
125
+ }
126
+ case 'MatchAs':
127
+ return {
128
+ matched: true,
129
+ bindings: node.name ? new Map([[node.name, value]]) : new Map(),
130
+ };
131
+ case 'MatchClass': {
132
+ if (!value || !value.klass || value.klass.name !== node.className)
133
+ return { matched: false, bindings: new Map() };
134
+ const bindings = new Map();
135
+ for (let i = 0; i < node.patterns.length; i++) {
136
+ const attrName = node.kwd_attrs[i] || node.patterns[i].name;
137
+ const attrValue = value.attributes.get(attrName);
138
+ const result = this.matchPattern(node.patterns[i], attrValue, scope);
139
+ if (!result.matched)
140
+ return { matched: false, bindings: new Map() };
141
+ for (const [k, v] of result.bindings.entries())
142
+ bindings.set(k, v);
143
+ }
144
+ return { matched: true, bindings };
145
+ }
146
+ default:
147
+ return { matched: false, bindings: new Map() };
148
+ }
149
+ }
150
+ function applyBindings(bindings, scope) {
151
+ for (const [name, value] of bindings.entries()) {
152
+ scope.set(name, value);
153
+ }
154
+ }
155
+ function* executeBlockGenerator(body, scope) {
156
+ for (const stmt of body) {
157
+ yield* this.executeStatementGenerator(stmt, scope);
158
+ }
159
+ return null;
160
+ }
161
+ function* executeStatementGenerator(node, scope) {
162
+ switch (node.type) {
163
+ case types_1.ASTNodeType.EXPRESSION_STATEMENT: {
164
+ if (this.expressionHasYield(node.expression)) {
165
+ yield* this.evaluateExpressionGenerator(node.expression, scope);
166
+ return null;
167
+ }
168
+ this.evaluateExpression(node.expression, scope);
169
+ return null;
170
+ }
171
+ case types_1.ASTNodeType.ASSIGNMENT: {
172
+ const value = this.expressionHasYield(node.value)
173
+ ? yield* this.evaluateExpressionGenerator(node.value, scope)
174
+ : this.evaluateExpression(node.value, scope);
175
+ for (const target of node.targets) {
176
+ this.assignTarget(target, value, scope);
177
+ }
178
+ return null;
179
+ }
180
+ case types_1.ASTNodeType.IF_STATEMENT: {
181
+ const test = this.expressionHasYield(node.test)
182
+ ? yield* this.evaluateExpressionGenerator(node.test, scope)
183
+ : this.evaluateExpression(node.test, scope);
184
+ if (this.isTruthy(test, scope)) {
185
+ yield* this.executeBlockGenerator(node.body, scope);
186
+ return null;
187
+ }
188
+ for (const branch of node.elifs) {
189
+ const branchTest = this.expressionHasYield(branch.test)
190
+ ? yield* this.evaluateExpressionGenerator(branch.test, scope)
191
+ : this.evaluateExpression(branch.test, scope);
192
+ if (this.isTruthy(branchTest, scope)) {
193
+ yield* this.executeBlockGenerator(branch.body, scope);
194
+ return null;
195
+ }
196
+ }
197
+ if (node.orelse?.length) {
198
+ yield* this.executeBlockGenerator(node.orelse, scope);
199
+ }
200
+ return null;
201
+ }
202
+ case types_1.ASTNodeType.WHILE_STATEMENT: {
203
+ while (true) {
204
+ const test = this.expressionHasYield(node.test)
205
+ ? yield* this.evaluateExpressionGenerator(node.test, scope)
206
+ : this.evaluateExpression(node.test, scope);
207
+ if (!this.isTruthy(test, scope))
208
+ break;
209
+ try {
210
+ yield* this.executeBlockGenerator(node.body, scope);
211
+ }
212
+ catch (err) {
213
+ if (err instanceof runtime_types_1.BreakSignal)
214
+ break;
215
+ if (err instanceof runtime_types_1.ContinueSignal)
216
+ continue;
217
+ throw err;
218
+ }
219
+ }
220
+ return null;
221
+ }
222
+ case types_1.ASTNodeType.FOR_STATEMENT: {
223
+ const iterable = this.expressionHasYield(node.iter)
224
+ ? yield* this.evaluateExpressionGenerator(node.iter, scope)
225
+ : this.evaluateExpression(node.iter, scope);
226
+ const items = this.iterableToArray(iterable);
227
+ for (const item of items) {
228
+ this.assignTarget(node.target, item, scope);
229
+ try {
230
+ yield* this.executeBlockGenerator(node.body, scope);
231
+ }
232
+ catch (err) {
233
+ if (err instanceof runtime_types_1.BreakSignal)
234
+ break;
235
+ if (err instanceof runtime_types_1.ContinueSignal)
236
+ continue;
237
+ throw err;
238
+ }
239
+ }
240
+ return null;
241
+ }
242
+ case types_1.ASTNodeType.MATCH_STATEMENT: {
243
+ const subject = this.expressionHasYield(node.subject)
244
+ ? yield* this.evaluateExpressionGenerator(node.subject, scope)
245
+ : this.evaluateExpression(node.subject, scope);
246
+ for (const matchCase of node.cases) {
247
+ const result = this.matchPattern(matchCase.pattern, subject, scope);
248
+ if (!result.matched)
249
+ continue;
250
+ if (matchCase.guard) {
251
+ const guardScope = new runtime_types_1.Scope(scope);
252
+ this.applyBindings(result.bindings, guardScope);
253
+ const guardValue = this.expressionHasYield(matchCase.guard)
254
+ ? yield* this.evaluateExpressionGenerator(matchCase.guard, guardScope)
255
+ : this.evaluateExpression(matchCase.guard, guardScope);
256
+ if (!this.isTruthy(guardValue, scope))
257
+ continue;
258
+ }
259
+ this.applyBindings(result.bindings, scope);
260
+ yield* this.executeBlockGenerator(matchCase.body, scope);
261
+ return null;
262
+ }
263
+ return null;
264
+ }
265
+ case types_1.ASTNodeType.RETURN_STATEMENT: {
266
+ const value = node.value
267
+ ? (this.expressionHasYield(node.value)
268
+ ? yield* this.evaluateExpressionGenerator(node.value, scope)
269
+ : this.evaluateExpression(node.value, scope))
270
+ : null;
271
+ throw new runtime_types_1.ReturnSignal(value);
272
+ }
273
+ case types_1.ASTNodeType.BREAK_STATEMENT:
274
+ throw new runtime_types_1.BreakSignal();
275
+ case types_1.ASTNodeType.CONTINUE_STATEMENT:
276
+ throw new runtime_types_1.ContinueSignal();
277
+ case types_1.ASTNodeType.PASS_STATEMENT:
278
+ return null;
279
+ default:
280
+ return this.executeStatement(node, scope);
281
+ }
282
+ }
283
+ //# sourceMappingURL=execution.js.map
@@ -0,0 +1,3 @@
1
+ import type { VirtualMachine } from './vm';
2
+ export declare function evaluateExpressionGenerator(this: VirtualMachine, node: any, scope: any): Generator<any, any, any>;
3
+ //# sourceMappingURL=expression-generator.d.ts.map
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.evaluateExpressionGenerator = evaluateExpressionGenerator;
4
+ const types_1 = require("../types");
5
+ function* evaluateExpressionGenerator(node, scope) {
6
+ switch (node.type) {
7
+ case types_1.ASTNodeType.YIELD: {
8
+ const value = node.value ? yield* this.evaluateExpressionGenerator(node.value, scope) : null;
9
+ const sent = yield value;
10
+ return sent;
11
+ }
12
+ case types_1.ASTNodeType.BINARY_OPERATION: {
13
+ const left = yield* this.evaluateExpressionGenerator(node.left, scope);
14
+ const right = yield* this.evaluateExpressionGenerator(node.right, scope);
15
+ return this.applyBinary(node.operator, left, right);
16
+ }
17
+ case types_1.ASTNodeType.UNARY_OPERATION: {
18
+ const operand = yield* this.evaluateExpressionGenerator(node.operand, scope);
19
+ return this.evaluateExpression({ ...node, operand }, scope);
20
+ }
21
+ case types_1.ASTNodeType.COMPARE: {
22
+ const left = yield* this.evaluateExpressionGenerator(node.left, scope);
23
+ const comparators = [];
24
+ for (const comp of node.comparators) {
25
+ comparators.push(yield* this.evaluateExpressionGenerator(comp, scope));
26
+ }
27
+ return this.evaluateExpression({ ...node, left, comparators }, scope);
28
+ }
29
+ case types_1.ASTNodeType.CALL: {
30
+ const callee = yield* this.evaluateExpressionGenerator(node.callee, scope);
31
+ const positional = [];
32
+ const kwargs = {};
33
+ for (const arg of node.args) {
34
+ if (arg.type === 'KeywordArg') {
35
+ kwargs[arg.name] = yield* this.evaluateExpressionGenerator(arg.value, scope);
36
+ }
37
+ else if (arg.type === 'StarArg') {
38
+ const value = yield* this.evaluateExpressionGenerator(arg.value, scope);
39
+ positional.push(...(Array.isArray(value) ? value : Array.from(value)));
40
+ }
41
+ else if (arg.type === 'KwArg') {
42
+ const value = yield* this.evaluateExpressionGenerator(arg.value, scope);
43
+ Object.assign(kwargs, value);
44
+ }
45
+ else {
46
+ positional.push(yield* this.evaluateExpressionGenerator(arg, scope));
47
+ }
48
+ }
49
+ return this.callFunction(callee, positional, scope, kwargs);
50
+ }
51
+ case types_1.ASTNodeType.ATTRIBUTE: {
52
+ const obj = yield* this.evaluateExpressionGenerator(node.object, scope);
53
+ return this.getAttribute(obj, node.name, scope);
54
+ }
55
+ case types_1.ASTNodeType.SUBSCRIPT: {
56
+ const obj = yield* this.evaluateExpressionGenerator(node.object, scope);
57
+ const index = yield* this.evaluateExpressionGenerator(node.index, scope);
58
+ return this.getSubscript(obj, index);
59
+ }
60
+ case types_1.ASTNodeType.IF_EXPRESSION: {
61
+ const test = yield* this.evaluateExpressionGenerator(node.test, scope);
62
+ return this.isTruthy(test, scope)
63
+ ? yield* this.evaluateExpressionGenerator(node.consequent, scope)
64
+ : yield* this.evaluateExpressionGenerator(node.alternate, scope);
65
+ }
66
+ default:
67
+ return this.evaluateExpression(node, scope);
68
+ }
69
+ }
70
+ //# sourceMappingURL=expression-generator.js.map
@@ -0,0 +1,13 @@
1
+ import type { VirtualMachine } from './vm';
2
+ import { Scope } from './runtime-types';
3
+ export declare function evaluateExpression(this: VirtualMachine, node: any, scope: Scope): any;
4
+ export declare function evaluateExpressionString(this: VirtualMachine, expr: string, scope: Scope): any;
5
+ export declare function executeExpressionInline(this: VirtualMachine, expr: string, scope: Scope): any;
6
+ export declare function applyFormatSpec(this: VirtualMachine, value: any, spec: string): string;
7
+ export declare function splitFormatSpec(expr: string): {
8
+ rawExpr: string;
9
+ rawSpec: string;
10
+ };
11
+ export declare function applyWidth(text: string, spec: string): string;
12
+ export declare function contains(this: VirtualMachine, container: any, value: any): boolean;
13
+ //# sourceMappingURL=expressions.d.ts.map