1 | // Generated automatically from src/optional/wren_opt_meta.wren. Do not edit. |
2 | static const char* metaModuleSource = |
3 | "class Meta {\n" |
4 | " static getModuleVariables(module) {\n" |
5 | " if (!(module is String)) Fiber.abort(\"Module name must be a string.\")\n" |
6 | " var result = getModuleVariables_(module)\n" |
7 | " if (result != null) return result\n" |
8 | "\n" |
9 | " Fiber.abort(\"Could not find a module named '%(module)'.\")\n" |
10 | " }\n" |
11 | "\n" |
12 | " static eval(source) {\n" |
13 | " if (!(source is String)) Fiber.abort(\"Source code must be a string.\")\n" |
14 | "\n" |
15 | " var closure = compile_(source, false, false)\n" |
16 | " // TODO: Include compile errors.\n" |
17 | " if (closure == null) Fiber.abort(\"Could not compile source code.\")\n" |
18 | "\n" |
19 | " closure.call()\n" |
20 | " }\n" |
21 | "\n" |
22 | " static compileExpression(source) {\n" |
23 | " if (!(source is String)) Fiber.abort(\"Source code must be a string.\")\n" |
24 | " return compile_(source, true, true)\n" |
25 | " }\n" |
26 | "\n" |
27 | " static compile(source) {\n" |
28 | " if (!(source is String)) Fiber.abort(\"Source code must be a string.\")\n" |
29 | " return compile_(source, false, true)\n" |
30 | " }\n" |
31 | "\n" |
32 | " foreign static compile_(source, isExpression, printErrors)\n" |
33 | " foreign static getModuleVariables_(module)\n" |
34 | "}\n" ; |
35 | |