blockly 11.0.0-beta.5 → 11.0.0-beta.7
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/blockly.min.js +722 -763
- package/blockly_compressed.js +676 -680
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +27 -29
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +12 -6
- package/core/block_svg.d.ts +28 -42
- package/core/blockly.d.ts +11 -51
- package/core/bubbles/bubble.d.ts +17 -2
- package/core/bubbles/mini_workspace_bubble.d.ts +1 -1
- package/core/bubbles/text_bubble.d.ts +1 -1
- package/core/bubbles/textinput_bubble.d.ts +1 -1
- package/core/clipboard.d.ts +0 -19
- package/core/comments/comment_view.d.ts +207 -0
- package/core/comments/rendered_workspace_comment.d.ts +75 -0
- package/core/comments/workspace_comment.d.ts +107 -0
- package/core/comments.d.ts +9 -0
- package/core/connection.d.ts +1 -1
- package/core/delete_area.d.ts +1 -2
- package/core/dragging/block_drag_strategy.d.ts +105 -0
- package/core/dragging/bubble_drag_strategy.d.ts +20 -0
- package/core/dragging/comment_drag_strategy.d.ts +20 -0
- package/core/dragging/dragger.d.ts +47 -0
- package/core/events/events.d.ts +3 -0
- package/core/events/events_click.d.ts +1 -1
- package/core/events/events_comment_base.d.ts +6 -1
- package/core/events/events_comment_change.d.ts +1 -1
- package/core/events/events_comment_collapse.d.ts +39 -0
- package/core/events/events_comment_create.d.ts +5 -1
- package/core/events/events_comment_delete.d.ts +5 -1
- package/core/events/events_comment_move.d.ts +17 -1
- package/core/events/utils.d.ts +2 -0
- package/core/field_dropdown.d.ts +1 -0
- package/core/field_image.d.ts +1 -1
- package/core/flyout_base.d.ts +17 -1
- package/core/flyout_button.d.ts +26 -1
- package/core/generator.d.ts +1 -1
- package/core/gesture.d.ts +25 -54
- package/core/grid.d.ts +9 -9
- package/core/icons/comment_icon.d.ts +8 -3
- package/core/icons/icon.d.ts +0 -6
- package/core/icons/icon_types.d.ts +2 -2
- package/core/icons/mutator_icon.d.ts +1 -16
- package/core/icons/warning_icon.d.ts +1 -1
- package/core/inputs/input.d.ts +10 -19
- package/core/{connection_previewers/insertion_marker_previewer.d.ts → insertion_marker_previewer.d.ts} +3 -3
- package/core/interfaces/i_comment_icon.d.ts +21 -0
- package/core/interfaces/i_deletable.d.ts +6 -0
- package/core/interfaces/i_delete_area.d.ts +1 -2
- package/core/interfaces/i_draggable.d.ts +47 -3
- package/core/interfaces/i_dragger.d.ts +32 -0
- package/core/interfaces/i_has_bubble.d.ts +1 -1
- package/core/interfaces/i_parameter_model.d.ts +7 -0
- package/core/interfaces/i_procedure_model.d.ts +7 -0
- package/core/interfaces/i_selectable.d.ts +5 -3
- package/core/internal_constants.d.ts +0 -7
- package/core/keyboard_nav/ast_node.d.ts +21 -2
- package/core/options.d.ts +1 -0
- package/core/registry.d.ts +2 -2
- package/core/renderers/common/drawer.d.ts +0 -7
- package/core/renderers/common/marker_svg.d.ts +7 -0
- package/core/renderers/measurables/icon.d.ts +0 -5
- package/core/serialization/priorities.d.ts +2 -0
- package/core/serialization/procedures.d.ts +28 -26
- package/core/serialization/workspace_comments.d.ts +45 -0
- package/core/serialization.d.ts +2 -1
- package/core/toolbox/toolbox.d.ts +1 -2
- package/core/utils/dom.d.ts +0 -9
- package/core/utils/keycodes.d.ts +32 -32
- package/core/utils/size.d.ts +10 -0
- package/core/utils/string.d.ts +0 -10
- package/core/workspace_comment_svg.d.ts +1 -2
- package/core/workspace_svg.d.ts +0 -27
- package/core/xml.d.ts +9 -3
- package/core-node.js +31 -0
- package/dart.d.ts +1 -24
- package/dart_compressed.js +22 -72
- package/dart_compressed.js.map +1 -1
- package/generators/dart/dart_generator.d.ts +17 -17
- package/generators/dart/text.d.ts +0 -1
- package/generators/javascript/javascript_generator.d.ts +34 -35
- package/generators/javascript/text.d.ts +0 -1
- package/generators/lua/lua_generator.d.ts +10 -10
- package/generators/lua/text.d.ts +0 -1
- package/generators/php/php_generator.d.ts +36 -36
- package/generators/php/text.d.ts +0 -1
- package/generators/python/python_generator.d.ts +20 -21
- package/generators/python/text.d.ts +0 -1
- package/index.js +19 -7
- package/javascript.d.ts +1 -41
- package/javascript_compressed.js +19 -54
- package/javascript_compressed.js.map +1 -1
- package/lua.d.ts +1 -18
- package/lua_compressed.js +24 -47
- package/lua_compressed.js.map +1 -1
- package/media/delete-icon.svg +1 -0
- package/media/foldout-icon.svg +1 -0
- package/media/resize-handle.svg +3 -0
- package/msg/ce.d.ts +8 -0
- package/msg/dtp.d.ts +8 -0
- package/msg/hsb.d.ts +8 -0
- package/msg/tdd.d.ts +8 -0
- package/package.json +46 -12
- package/php.d.ts +1 -43
- package/php_compressed.js +13 -46
- package/php_compressed.js.map +1 -1
- package/python.d.ts +1 -27
- package/python_compressed.js +21 -40
- package/python_compressed.js.map +1 -1
- package/blockly.js +0 -22
- package/blocks.js +0 -22
- package/browser.js +0 -30
- package/core/block_dragger.d.ts +0 -212
- package/core/bubble_dragger.d.ts +0 -77
- package/core/field_angle.d.ts +0 -208
- package/core/field_colour.d.ts +0 -243
- package/core/field_multilineinput.d.ts +0 -182
- package/core/interfaces/i_block_dragger.d.ts +0 -47
- package/core/renderers/minimalist/constants.d.ts +0 -21
- package/core/renderers/minimalist/drawer.d.ts +0 -26
- package/core/renderers/minimalist/info.d.ts +0 -35
- package/core/renderers/minimalist/minimalist.d.ts +0 -12
- package/core/renderers/minimalist/renderer.d.ts +0 -48
- package/core-browser.js +0 -26
- package/core.js +0 -26
- package/dart.js +0 -22
- package/generators/dart/colour.d.ts +0 -16
- package/generators/javascript/colour.d.ts +0 -16
- package/generators/lua/colour.d.ts +0 -16
- package/generators/php/colour.d.ts +0 -16
- package/generators/python/colour.d.ts +0 -16
- package/javascript.js +0 -23
- package/lua.js +0 -22
- package/msg/constants.d.ts +0 -14
- package/msg/qqq.d.ts +0 -14
- package/msg/synonyms.d.ts +0 -14
- package/node.js +0 -21
- package/php.js +0 -22
- package/python.js +0 -23
package/lua.d.ts
CHANGED
|
@@ -4,21 +4,4 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export
|
|
8
|
-
ATOMIC = 0, // literals
|
|
9
|
-
// The next level was not explicit in documentation and inferred by Ellen.
|
|
10
|
-
HIGH = 1, // Function calls, tables[]
|
|
11
|
-
EXPONENTIATION = 2, // ^
|
|
12
|
-
UNARY = 3, // not # - ~
|
|
13
|
-
MULTIPLICATIVE = 4, // * / %
|
|
14
|
-
ADDITIVE = 5, // + -
|
|
15
|
-
CONCATENATION = 6, // ..
|
|
16
|
-
RELATIONAL = 7, // < > <= >= ~= ==
|
|
17
|
-
AND = 8, // and
|
|
18
|
-
OR = 9, // or
|
|
19
|
-
NONE = 99,
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export declare const luaGenerator: any;
|
|
23
|
-
|
|
24
|
-
export {LuaGenerator} from './generators/lua';
|
|
7
|
+
export * from './generators/lua';
|
package/lua_compressed.js
CHANGED
|
@@ -12,29 +12,8 @@
|
|
|
12
12
|
}
|
|
13
13
|
}(this, function(__parent__) {
|
|
14
14
|
var $=__parent__.__namespace__;
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
r = math.floor(math.min(100, math.max(0, r)) * 2.55 + .5)
|
|
18
|
-
g = math.floor(math.min(100, math.max(0, g)) * 2.55 + .5)
|
|
19
|
-
b = math.floor(math.min(100, math.max(0, b)) * 2.55 + .5)
|
|
20
|
-
return string.format("#%02x%02x%02x", r, g, b)
|
|
21
|
-
end
|
|
22
|
-
`),d=b.valueToCode(a,"RED",Order$$module$build$src$generators$lua$lua_generator.NONE)||0,e=b.valueToCode(a,"GREEN",Order$$module$build$src$generators$lua$lua_generator.NONE)||0;a=b.valueToCode(a,"BLUE",Order$$module$build$src$generators$lua$lua_generator.NONE)||0;return[c+"("+d+", "+e+", "+a+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},colour_blend$$module$build$src$generators$lua$colour=function(a,b){const c=b.provideFunction_("colour_blend",`
|
|
23
|
-
function ${b.FUNCTION_NAME_PLACEHOLDER_}(colour1, colour2, ratio)
|
|
24
|
-
local r1 = tonumber(string.sub(colour1, 2, 3), 16)
|
|
25
|
-
local r2 = tonumber(string.sub(colour2, 2, 3), 16)
|
|
26
|
-
local g1 = tonumber(string.sub(colour1, 4, 5), 16)
|
|
27
|
-
local g2 = tonumber(string.sub(colour2, 4, 5), 16)
|
|
28
|
-
local b1 = tonumber(string.sub(colour1, 6, 7), 16)
|
|
29
|
-
local b2 = tonumber(string.sub(colour2, 6, 7), 16)
|
|
30
|
-
local ratio = math.min(1, math.max(0, ratio))
|
|
31
|
-
local r = math.floor(r1 * (1 - ratio) + r2 * ratio + .5)
|
|
32
|
-
local g = math.floor(g1 * (1 - ratio) + g2 * ratio + .5)
|
|
33
|
-
local b = math.floor(b1 * (1 - ratio) + b2 * ratio + .5)
|
|
34
|
-
return string.format("#%02x%02x%02x", r, g, b)
|
|
35
|
-
end
|
|
36
|
-
`),d=b.valueToCode(a,"COLOUR1",Order$$module$build$src$generators$lua$lua_generator.NONE)||"'#000000'",e=b.valueToCode(a,"COLOUR2",Order$$module$build$src$generators$lua$lua_generator.NONE)||"'#000000'";a=b.valueToCode(a,"RATIO",Order$$module$build$src$generators$lua$lua_generator.NONE)||0;return[c+"("+d+", "+e+", "+a+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},lists_create_empty$$module$build$src$generators$lua$lists=function(a,b){return["{}",Order$$module$build$src$generators$lua$lua_generator.HIGH]},
|
|
37
|
-
lists_create_with$$module$build$src$generators$lua$lists=function(a,b){const c=Array(a.itemCount_);for(let d=0;d<a.itemCount_;d++)c[d]=b.valueToCode(a,"ADD"+d,Order$$module$build$src$generators$lua$lua_generator.NONE)||"None";return["{"+c.join(", ")+"}",Order$$module$build$src$generators$lua$lua_generator.HIGH]},lists_repeat$$module$build$src$generators$lua$lists=function(a,b){const c=b.provideFunction_("create_list_repeated",`
|
|
15
|
+
var lists_create_empty$$module$build$src$generators$lua$lists=function(a,b){return["{}",Order$$module$build$src$generators$lua$lua_generator.HIGH]},lists_create_with$$module$build$src$generators$lua$lists=function(a,b){const c=Array(a.itemCount_);for(let d=0;d<a.itemCount_;d++)c[d]=b.valueToCode(a,"ADD"+d,Order$$module$build$src$generators$lua$lua_generator.NONE)||"nil";return["{"+c.join(", ")+"}",Order$$module$build$src$generators$lua$lua_generator.HIGH]},lists_repeat$$module$build$src$generators$lua$lists=
|
|
16
|
+
function(a,b){const c=b.provideFunction_("create_list_repeated",`
|
|
38
17
|
function ${b.FUNCTION_NAME_PLACEHOLDER_}(item, count)
|
|
39
18
|
local t = {}
|
|
40
19
|
for i = 1, count do
|
|
@@ -42,9 +21,9 @@ function ${b.FUNCTION_NAME_PLACEHOLDER_}(item, count)
|
|
|
42
21
|
end
|
|
43
22
|
return t
|
|
44
23
|
end
|
|
45
|
-
`),d=b.valueToCode(a,"ITEM",Order$$module$build$src$generators$lua$lua_generator.NONE)||"
|
|
46
|
-
|
|
47
|
-
|
|
24
|
+
`),d=b.valueToCode(a,"ITEM",Order$$module$build$src$generators$lua$lua_generator.NONE)||"nil";a=b.valueToCode(a,"NUM",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0";return[c+"("+d+", "+a+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},lists_length$$module$build$src$generators$lua$lists=function(a,b){return["#"+(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.UNARY)||"{}"),Order$$module$build$src$generators$lua$lua_generator.UNARY]},lists_isEmpty$$module$build$src$generators$lua$lists=
|
|
25
|
+
function(a,b){return["#"+(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.UNARY)||"{}")+" == 0",Order$$module$build$src$generators$lua$lua_generator.RELATIONAL]},lists_indexOf$$module$build$src$generators$lua$lists=function(a,b){const c=b.valueToCode(a,"FIND",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''",d=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.NONE)||"{}";return[("FIRST"===a.getFieldValue("END")?b.provideFunction_("first_index",
|
|
26
|
+
`
|
|
48
27
|
function ${b.FUNCTION_NAME_PLACEHOLDER_}(t, elem)
|
|
49
28
|
for k, v in ipairs(t) do
|
|
50
29
|
if v == elem then
|
|
@@ -66,8 +45,8 @@ end
|
|
|
66
45
|
"1";b=getListIndex$$module$build$src$generators$lua$lists(e,d,b);if("GET"===c)return[e+"["+b+"]",Order$$module$build$src$generators$lua$lua_generator.HIGH];d="table.remove("+e+", "+b+")";return"GET_REMOVE"===c?[d,Order$$module$build$src$generators$lua$lua_generator.HIGH]:d+"\n"}if("REMOVE"===c)return c=b.valueToCode(a,"AT","FROM_END"===d?Order$$module$build$src$generators$lua$lua_generator.ADDITIVE:Order$$module$build$src$generators$lua$lua_generator.NONE)||"1",b=b.nameDB_.getDistinctName("tmp_list",
|
|
67
46
|
$.NameType$$module$build$src$core$names.VARIABLE),c=getListIndex$$module$build$src$generators$lua$lists(b,d,c),b+" = "+e+"\ntable.remove("+b+", "+c+")\n";a=b.valueToCode(a,"AT",Order$$module$build$src$generators$lua$lua_generator.NONE)||"1";return[("GET"===c?b.provideFunction_("list_get_"+d.toLowerCase(),["function "+b.FUNCTION_NAME_PLACEHOLDER_+"(t"+("FROM_END"===d||"FROM_START"===d?", at)":")")," return t["+getListIndex$$module$build$src$generators$lua$lists("t",d,"at")+"]","end"]):b.provideFunction_("list_remove_"+
|
|
68
47
|
d.toLowerCase(),["function "+b.FUNCTION_NAME_PLACEHOLDER_+"(t"+("FROM_END"===d||"FROM_START"===d?", at)":")")," return table.remove(t, "+getListIndex$$module$build$src$generators$lua$lists("t",d,"at")+")","end"]))+"("+e+("FROM_END"===d||"FROM_START"===d?", "+a:"")+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},lists_setIndex$$module$build$src$generators$lua$lists=function(a,b){let c=b.valueToCode(a,"LIST",Order$$module$build$src$generators$lua$lua_generator.HIGH)||"{}";const d=a.getFieldValue("MODE")||
|
|
69
|
-
"SET",e=a.getFieldValue("WHERE")||"FROM_START",f=b.valueToCode(a,"AT",Order$$module$build$src$generators$lua$lua_generator.ADDITIVE)||"1";a=b.valueToCode(a,"TO",Order$$module$build$src$generators$lua$lua_generator.NONE)||"
|
|
70
|
-
|
|
48
|
+
"SET",e=a.getFieldValue("WHERE")||"FROM_START",f=b.valueToCode(a,"AT",Order$$module$build$src$generators$lua$lua_generator.ADDITIVE)||"1";a=b.valueToCode(a,"TO",Order$$module$build$src$generators$lua$lua_generator.NONE)||"Nil";let g="";"LAST"!==e&&"FROM_END"!==e&&"RANDOM"!==e||c.match(/^\w+$/)||(b=b.nameDB_.getDistinctName("tmp_list",$.NameType$$module$build$src$core$names.VARIABLE),g=b+" = "+c+"\n",c=b);g="SET"===d?g+(c+"["+getListIndex$$module$build$src$generators$lua$lists(c,e,f)+"] = "+a):g+("table.insert("+
|
|
49
|
+
c+", "+(getListIndex$$module$build$src$generators$lua$lists(c,e,f)+("LAST"===e?" + 1":""))+", "+a+")");return g+"\n"},lists_getSublist$$module$build$src$generators$lua$lists=function(a,b){const c=b.valueToCode(a,"LIST",Order$$module$build$src$generators$lua$lua_generator.NONE)||"{}",d=a.getFieldValue("WHERE1"),e=a.getFieldValue("WHERE2"),f=b.valueToCode(a,"AT1",Order$$module$build$src$generators$lua$lua_generator.NONE)||"1";a=b.valueToCode(a,"AT2",Order$$module$build$src$generators$lua$lua_generator.NONE)||
|
|
71
50
|
"1";const g="FROM_END"===d||"FROM_START"===d?", at1":"",h="FROM_END"===e||"FROM_START"===e?", at2":"";return[b.provideFunction_("list_sublist_"+d.toLowerCase()+"_"+e.toLowerCase(),`
|
|
72
51
|
function ${b.FUNCTION_NAME_PLACEHOLDER_}(source${g}${h})
|
|
73
52
|
local t = {}
|
|
@@ -127,10 +106,10 @@ end
|
|
|
127
106
|
if(a.getInput("ELSE")||b.STATEMENT_SUFFIX)c=b.statementToCode(a,"ELSE"),b.STATEMENT_SUFFIX&&(c=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT)+c),d+="else\n"+c;return d+"end\n"},logic_compare$$module$build$src$generators$lua$logic=function(a,b){const c={EQ:"==",NEQ:"~=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],d=b.valueToCode(a,"A",Order$$module$build$src$generators$lua$lua_generator.RELATIONAL)||"0";a=b.valueToCode(a,"B",Order$$module$build$src$generators$lua$lua_generator.RELATIONAL)||
|
|
128
107
|
"0";return[d+" "+c+" "+a,Order$$module$build$src$generators$lua$lua_generator.RELATIONAL]},logic_operation$$module$build$src$generators$lua$logic=function(a,b){const c="AND"===a.getFieldValue("OP")?"and":"or",d="and"===c?Order$$module$build$src$generators$lua$lua_generator.AND:Order$$module$build$src$generators$lua$lua_generator.OR;let e=b.valueToCode(a,"A",d);a=b.valueToCode(a,"B",d);e||a?(b="and"===c?"true":"false",e||(e=b),a||(a=b)):a=e="false";return[e+" "+c+" "+a,d]},logic_negate$$module$build$src$generators$lua$logic=
|
|
129
108
|
function(a,b){return["not "+(b.valueToCode(a,"BOOL",Order$$module$build$src$generators$lua$lua_generator.UNARY)||"true"),Order$$module$build$src$generators$lua$lua_generator.UNARY]},logic_boolean$$module$build$src$generators$lua$logic=function(a,b){return["TRUE"===a.getFieldValue("BOOL")?"true":"false",Order$$module$build$src$generators$lua$lua_generator.ATOMIC]},logic_null$$module$build$src$generators$lua$logic=function(a,b){return["nil",Order$$module$build$src$generators$lua$lua_generator.ATOMIC]},
|
|
130
|
-
logic_ternary$$module$build$src$generators$lua$logic=function(a,b){const c=b.valueToCode(a,"IF",Order$$module$build$src$generators$lua$lua_generator.AND)||"false",d=b.valueToCode(a,"THEN",Order$$module$build$src$generators$lua$lua_generator.AND)||"nil";a=b.valueToCode(a,"ELSE",Order$$module$build$src$generators$lua$lua_generator.OR)||"nil";return[c+" and "+d+" or "+a,Order$$module$build$src$generators$lua$lua_generator.OR]},addContinueLabel$$module$build$src$generators$lua$loops=function(a,b){return
|
|
131
|
-
a
|
|
132
|
-
|
|
133
|
-
|
|
109
|
+
logic_ternary$$module$build$src$generators$lua$logic=function(a,b){const c=b.valueToCode(a,"IF",Order$$module$build$src$generators$lua$lua_generator.AND)||"false",d=b.valueToCode(a,"THEN",Order$$module$build$src$generators$lua$lua_generator.AND)||"nil";a=b.valueToCode(a,"ELSE",Order$$module$build$src$generators$lua$lua_generator.OR)||"nil";return[c+" and "+d+" or "+a,Order$$module$build$src$generators$lua$lua_generator.OR]},addContinueLabel$$module$build$src$generators$lua$loops=function(a,b){return a.includes(CONTINUE_STATEMENT$$module$build$src$generators$lua$loops)?
|
|
110
|
+
a+b+"::continue::\n":a},controls_repeat_ext$$module$build$src$generators$lua$loops=function(a,b){let c;c=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):b.valueToCode(a,"TIMES",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0";c=$.isNumber$$module$build$src$core$utils$string(c)?parseInt(c,10):"math.floor("+c+")";let d=b.statementToCode(a,"DO");d=b.addLoopTrap(d,a);d=addContinueLabel$$module$build$src$generators$lua$loops(d,b.INDENT);return"for "+b.nameDB_.getDistinctName("count",
|
|
111
|
+
$.NameType$$module$build$src$core$names.VARIABLE)+" = 1, "+c+" do\n"+d+"end\n"},controls_whileUntil$$module$build$src$generators$lua$loops=function(a,b){const c="UNTIL"===a.getFieldValue("MODE");let d=b.valueToCode(a,"BOOL",c?Order$$module$build$src$generators$lua$lua_generator.UNARY:Order$$module$build$src$generators$lua$lua_generator.NONE)||"false",e=b.statementToCode(a,"DO");e=b.addLoopTrap(e,a);e=addContinueLabel$$module$build$src$generators$lua$loops(e,b.INDENT);c&&(d="not "+d);return"while "+
|
|
112
|
+
d+" do\n"+e+"end\n"},controls_for$$module$build$src$generators$lua$loops=function(a,b){const c=b.getVariableName(a.getFieldValue("VAR")),d=b.valueToCode(a,"FROM",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0",e=b.valueToCode(a,"TO",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0",f=b.valueToCode(a,"BY",Order$$module$build$src$generators$lua$lua_generator.NONE)||"1";let g=b.statementToCode(a,"DO");g=b.addLoopTrap(g,a);g=addContinueLabel$$module$build$src$generators$lua$loops(g,
|
|
134
113
|
b.INDENT);a="";let h;$.isNumber$$module$build$src$core$utils$string(d)&&$.isNumber$$module$build$src$core$utils$string(e)&&$.isNumber$$module$build$src$core$utils$string(f)?h=(Number(d)<=Number(e)?"":"-")+Math.abs(Number(f)):(a="",h=b.nameDB_.getDistinctName(c+"_inc",$.NameType$$module$build$src$core$names.VARIABLE),a+=h+" = ",a=$.isNumber$$module$build$src$core$utils$string(f)?a+(Math.abs(f)+"\n"):a+("math.abs("+f+")\n"),a=a+("if ("+d+") > ("+e+") then\n")+(b.INDENT+h+" = -"+h+"\n"),a+="end\n");
|
|
135
114
|
return a+("for "+c+" = "+d+", "+e+", "+h)+(" do\n"+g+"end\n")},controls_forEach$$module$build$src$generators$lua$loops=function(a,b){const c=b.getVariableName(a.getFieldValue("VAR")),d=b.valueToCode(a,"LIST",Order$$module$build$src$generators$lua$lua_generator.NONE)||"{}";let e=b.statementToCode(a,"DO");e=b.addLoopTrap(e,a);e=addContinueLabel$$module$build$src$generators$lua$loops(e,b.INDENT);return"for _, "+c+" in ipairs("+d+") do \n"+e+"end\n"},controls_flow_statements$$module$build$src$generators$lua$loops=
|
|
136
115
|
function(a,b){let c="";b.STATEMENT_PREFIX&&(c+=b.injectId(b.STATEMENT_PREFIX,a));b.STATEMENT_SUFFIX&&(c+=b.injectId(b.STATEMENT_SUFFIX,a));if(b.STATEMENT_PREFIX){const d=a.getSurroundLoop();d&&!d.suppressPrefixSuffix&&(c+=b.injectId(b.STATEMENT_PREFIX,d))}switch(a.getFieldValue("FLOW")){case "BREAK":return c+"break\n";case "CONTINUE":return c+CONTINUE_STATEMENT$$module$build$src$generators$lua$loops}throw Error("Unknown flow statement.");},math_number$$module$build$src$generators$lua$math=function(a,
|
|
@@ -275,14 +254,13 @@ end
|
|
|
275
254
|
function(a,b){const c=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0",d=b.valueToCode(a,"LOW",Order$$module$build$src$generators$lua$lua_generator.NONE)||"-math.huge";a=b.valueToCode(a,"HIGH",Order$$module$build$src$generators$lua$lua_generator.NONE)||"math.huge";return["math.min(math.max("+c+", "+d+"), "+a+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},math_random_int$$module$build$src$generators$lua$math=function(a,b){const c=b.valueToCode(a,
|
|
276
255
|
"FROM",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0";a=b.valueToCode(a,"TO",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0";return["math.random("+c+", "+a+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},math_random_float$$module$build$src$generators$lua$math=function(a,b){return["math.random()",Order$$module$build$src$generators$lua$lua_generator.HIGH]},math_atan2$$module$build$src$generators$lua$math=function(a,b){const c=b.valueToCode(a,"X",Order$$module$build$src$generators$lua$lua_generator.NONE)||
|
|
277
256
|
"0";return["math.deg(math.atan2("+(b.valueToCode(a,"Y",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0")+", "+c+"))",Order$$module$build$src$generators$lua$lua_generator.HIGH]},procedures_defreturn$$module$build$src$generators$lua$procedures=function(a,b){const c=b.getProcedureName(a.getFieldValue("NAME"));var d="";b.STATEMENT_PREFIX&&(d+=b.injectId(b.STATEMENT_PREFIX,a));b.STATEMENT_SUFFIX&&(d+=b.injectId(b.STATEMENT_SUFFIX,a));d&&(d=b.prefixLines(d,b.INDENT));let e="";b.INFINITE_LOOP_TRAP&&
|
|
278
|
-
(e=b.prefixLines(b.injectId(b.INFINITE_LOOP_TRAP,a),b.INDENT));let f=b.statementToCode(a,"STACK")
|
|
279
|
-
function(a,b){const c=b.getProcedureName(a.getFieldValue("NAME")),d=[],e=a.getVars();for(let f=0;f<e.length;f++)d[f]=b.valueToCode(a,"ARG"+f,Order$$module$build$src$generators$lua$lua_generator.NONE)||"nil";return[c+"("+d.join(", ")+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},procedures_callnoreturn$$module$build$src$generators$lua$procedures=function(a,b){return b.forBlock.procedures_callreturn(a,b)[0]+"\n"},procedures_ifreturn$$module$build$src$generators$lua$procedures=
|
|
280
|
-
b){let c="if "+(b.valueToCode(a,"CONDITION",Order$$module$build$src$generators$lua$lua_generator.NONE)||"false")+" then\n";b.STATEMENT_SUFFIX&&(c+=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT));a.hasReturnValue_?(a=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.NONE)||"nil",c+=b.INDENT+"return "+a+"\n"):c+=b.INDENT+"return\n";return c+"end\n"},text$$module$build$src$generators$lua$text=function(a,b){return[b.quote_(a.getFieldValue("TEXT")),Order$$module$build$src$generators$lua$lua_generator.ATOMIC]},
|
|
281
|
-
|
|
282
|
-
"''"
|
|
283
|
-
"''";return
|
|
284
|
-
|
|
285
|
-
"''";return[("FIRST"===a.getFieldValue("END")?b.provideFunction_("firstIndexOf",`
|
|
257
|
+
(e=b.prefixLines(b.injectId(b.INFINITE_LOOP_TRAP,a),b.INDENT));let f="";a.getInput("STACK")&&(f=b.statementToCode(a,"STACK"));let g="";a.getInput("RETURN")&&(g=b.valueToCode(a,"RETURN",Order$$module$build$src$generators$lua$lua_generator.NONE)||"");let h="";f&&g&&(h=d);g?g=b.INDENT+"return "+g+"\n":f||(f="");const k=[],l=a.getVars();for(let m=0;m<l.length;m++)k[m]=b.getVariableName(l[m]);d="function "+c+"("+k.join(", ")+")\n"+d+e+f+h+g+"end\n";d=b.scrub_(a,d);b.definitions_["%"+c]=d;return null},
|
|
258
|
+
procedures_callreturn$$module$build$src$generators$lua$procedures=function(a,b){const c=b.getProcedureName(a.getFieldValue("NAME")),d=[],e=a.getVars();for(let f=0;f<e.length;f++)d[f]=b.valueToCode(a,"ARG"+f,Order$$module$build$src$generators$lua$lua_generator.NONE)||"nil";return[c+"("+d.join(", ")+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},procedures_callnoreturn$$module$build$src$generators$lua$procedures=function(a,b){return b.forBlock.procedures_callreturn(a,b)[0]+"\n"},procedures_ifreturn$$module$build$src$generators$lua$procedures=
|
|
259
|
+
function(a,b){let c="if "+(b.valueToCode(a,"CONDITION",Order$$module$build$src$generators$lua$lua_generator.NONE)||"false")+" then\n";b.STATEMENT_SUFFIX&&(c+=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT));a.hasReturnValue_?(a=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.NONE)||"nil",c+=b.INDENT+"return "+a+"\n"):c+=b.INDENT+"return\n";return c+"end\n"},text$$module$build$src$generators$lua$text=function(a,b){return[b.quote_(a.getFieldValue("TEXT")),Order$$module$build$src$generators$lua$lua_generator.ATOMIC]},
|
|
260
|
+
text_join$$module$build$src$generators$lua$text=function(a,b){if(0===a.itemCount_)return["''",Order$$module$build$src$generators$lua$lua_generator.ATOMIC];if(1===a.itemCount_)return["tostring("+(b.valueToCode(a,"ADD0",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''")+")",Order$$module$build$src$generators$lua$lua_generator.HIGH];if(2===a.itemCount_){var c=b.valueToCode(a,"ADD0",Order$$module$build$src$generators$lua$lua_generator.CONCATENATION)||"''";a=b.valueToCode(a,"ADD1",Order$$module$build$src$generators$lua$lua_generator.CONCATENATION)||
|
|
261
|
+
"''";return[c+" .. "+a,Order$$module$build$src$generators$lua$lua_generator.CONCATENATION]}c=[];for(let d=0;d<a.itemCount_;d++)c[d]=b.valueToCode(a,"ADD"+d,Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";return["table.concat({"+c.join(", ")+"})",Order$$module$build$src$generators$lua$lua_generator.HIGH]},text_append$$module$build$src$generators$lua$text=function(a,b){const c=b.getVariableName(a.getFieldValue("VAR"));a=b.valueToCode(a,"TEXT",Order$$module$build$src$generators$lua$lua_generator.CONCATENATION)||
|
|
262
|
+
"''";return c+" = "+c+" .. "+a+"\n"},text_length$$module$build$src$generators$lua$text=function(a,b){return["#"+(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.UNARY)||"''"),Order$$module$build$src$generators$lua$lua_generator.UNARY]},text_isEmpty$$module$build$src$generators$lua$text=function(a,b){return["#"+(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.UNARY)||"''")+" == 0",Order$$module$build$src$generators$lua$lua_generator.RELATIONAL]},
|
|
263
|
+
text_indexOf$$module$build$src$generators$lua$text=function(a,b){const c=b.valueToCode(a,"FIND",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''",d=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";return[("FIRST"===a.getFieldValue("END")?b.provideFunction_("firstIndexOf",`
|
|
286
264
|
function ${b.FUNCTION_NAME_PLACEHOLDER_}(str, substr)
|
|
287
265
|
local i = string.find(str, substr, 1, true)
|
|
288
266
|
if i == nil then
|
|
@@ -298,17 +276,16 @@ function ${b.FUNCTION_NAME_PLACEHOLDER_}(str, substr)
|
|
|
298
276
|
end
|
|
299
277
|
return 0
|
|
300
278
|
end
|
|
301
|
-
`))+"("+d+", "+c+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},text_charAt$$module$build$src$generators$lua$text=function(a,b){var c=a.getFieldValue("WHERE")||"FROM_START";const d=b.valueToCode(a,"
|
|
302
|
-
`
|
|
279
|
+
`))+"("+d+", "+c+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},text_charAt$$module$build$src$generators$lua$text=function(a,b){var c=a.getFieldValue("WHERE")||"FROM_START";const d=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";if("RANDOM"===c)b=b.provideFunction_("text_random_letter",`
|
|
303
280
|
function ${b.FUNCTION_NAME_PLACEHOLDER_}(str)
|
|
304
281
|
local index = math.random(string.len(str))
|
|
305
282
|
return string.sub(str, index, index)
|
|
306
283
|
end
|
|
307
|
-
`)+"("+
|
|
284
|
+
`)+"("+d+")";else{if("FIRST"===c)c="1";else if("LAST"===c)c="-1";else if(a=b.valueToCode(a,"AT","FROM_END"===c?Order$$module$build$src$generators$lua$lua_generator.UNARY:Order$$module$build$src$generators$lua$lua_generator.NONE)||"1","FROM_START"===c)c=a;else if("FROM_END"===c)c="-"+a;else throw Error("Unhandled option (text_charAt).");b=c.match(/^-?\w*$/)?"string.sub("+d+", "+c+", "+c+")":b.provideFunction_("text_char_at",`
|
|
308
285
|
function ${b.FUNCTION_NAME_PLACEHOLDER_}(str, index)
|
|
309
286
|
return string.sub(str, index, index)
|
|
310
287
|
end
|
|
311
|
-
`)+"("+
|
|
288
|
+
`)+"("+d+", "+c+")"}return[b,Order$$module$build$src$generators$lua$lua_generator.HIGH]},text_getSubstring$$module$build$src$generators$lua$text=function(a,b){const c=b.valueToCode(a,"STRING",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";var d=a.getFieldValue("WHERE1"),e=b.valueToCode(a,"AT1","FROM_END"===d?Order$$module$build$src$generators$lua$lua_generator.UNARY:Order$$module$build$src$generators$lua$lua_generator.NONE)||"1";if("FIRST"===d)d=1;else if("FROM_START"===d)d=e;else if("FROM_END"===
|
|
312
289
|
d)d="-"+e;else throw Error("Unhandled option (text_getSubstring)");e=a.getFieldValue("WHERE2");a=b.valueToCode(a,"AT2","FROM_END"===e?Order$$module$build$src$generators$lua$lua_generator.UNARY:Order$$module$build$src$generators$lua$lua_generator.NONE)||"1";if("LAST"===e)a=-1;else if("FROM_START"!==e)if("FROM_END"===e)a="-"+a;else throw Error("Unhandled option (text_getSubstring)");return["string.sub("+c+", "+d+", "+a+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},text_changeCase$$module$build$src$generators$lua$text=
|
|
313
290
|
function(a,b){const c=a.getFieldValue("CASE");a=b.valueToCode(a,"TEXT",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";let d;"UPPERCASE"===c?d="string.upper":"LOWERCASE"===c?d="string.lower":"TITLECASE"===c&&(d=b.provideFunction_("text_titlecase",`
|
|
314
291
|
function ${b.FUNCTION_NAME_PLACEHOLDER_}(str)
|
|
@@ -375,7 +352,7 @@ variables_set$$module$build$src$generators$lua$variables=function(a,b){const c=b
|
|
|
375
352
|
var LuaGenerator$$module$build$src$generators$lua$lua_generator=class extends $.CodeGenerator$$module$build$src$core$generator{constructor(a="Lua"){super(a);this.isInitialized=!1;for(const b in Order$$module$build$src$generators$lua$lua_generator)a=Order$$module$build$src$generators$lua$lua_generator[b],"string"!==typeof a&&(this["ORDER_"+b]=a);this.addReservedWords("_,__inext,assert,bit,colors,colours,coroutine,disk,dofile,error,fs,fetfenv,getmetatable,gps,help,io,ipairs,keys,loadfile,loadstring,math,native,next,os,paintutils,pairs,parallel,pcall,peripheral,print,printError,rawequal,rawget,rawset,read,rednet,redstone,rs,select,setfenv,setmetatable,sleep,string,table,term,textutils,tonumber,tostring,turtle,type,unpack,vector,write,xpcall,_VERSION,__indext,HTTP,and,break,do,else,elseif,end,false,for,function,if,in,local,nil,not,or,repeat,return,then,true,until,while,add,sub,mul,div,mod,pow,unm,concat,len,eq,lt,le,index,newindex,call,assert,collectgarbage,dofile,error,_G,getmetatable,inpairs,load,loadfile,next,pairs,pcall,print,rawequal,rawget,rawlen,rawset,select,setmetatable,tonumber,tostring,type,_VERSION,xpcall,require,package,string,table,math,bit32,io,file,os,debug")}init(a){super.init(a);
|
|
376
353
|
this.nameDB_?this.nameDB_.reset():this.nameDB_=new $.Names$$module$build$src$core$names(this.RESERVED_WORDS_);this.nameDB_.setVariableMap(a.getVariableMap());this.nameDB_.populateVariables(a);this.nameDB_.populateProcedures(a);this.isInitialized=!0}finish(a){const b=Object.values(this.definitions_);a=super.finish(a);this.isInitialized=!1;this.nameDB_.reset();return b.join("\n\n")+"\n\n\n"+a}scrubNakedValue(a){return"local _ = "+a+"\n"}quote_(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/'/g,
|
|
377
354
|
"\\'");return"'"+a+"'"}multiline_quote_(a){return a.split(/\n/g).map(this.quote_).join(" .. '\\n' ..\n")}scrub_(a,b,c=!1){let d="";if(!a.outputConnection||!a.outputConnection.targetConnection){var e=a.getCommentText();e&&(e=$.wrap$$module$build$src$core$utils$string(e,this.COMMENT_WRAP-3),d+=this.prefixLines(e,"-- ")+"\n");for(let f=0;f<a.inputList.length;f++)a.inputList[f].type===$.inputTypes$$module$build$src$core$inputs$input_types.VALUE&&(e=a.inputList[f].connection.targetBlock())&&(e=this.allNestedComments(e))&&
|
|
378
|
-
(d+=this.prefixLines(e,"-- "))}a=a.nextConnection&&a.nextConnection.targetBlock();c=c?"":this.blockToCode(a);return d+b+c}},module$build$src$generators$lua$lua_generator={};module$build$src$generators$lua$lua_generator.LuaGenerator=LuaGenerator$$module$build$src$generators$lua$lua_generator;module$build$src$generators$lua$lua_generator.Order=Order$$module$build$src$generators$lua$lua_generator;var
|
|
355
|
+
(d+=this.prefixLines(e,"-- "))}a=a.nextConnection&&a.nextConnection.targetBlock();c=c?"":this.blockToCode(a);return d+b+c}},module$build$src$generators$lua$lua_generator={};module$build$src$generators$lua$lua_generator.LuaGenerator=LuaGenerator$$module$build$src$generators$lua$lua_generator;module$build$src$generators$lua$lua_generator.Order=Order$$module$build$src$generators$lua$lua_generator;var getListIndex$$module$build$src$generators$lua$lists=function(a,b,c){return"FIRST"===b?"1":"FROM_END"===b?"#"+a+" + 1 - "+c:"LAST"===b?"#"+a:"RANDOM"===b?"math.random(#"+a+")":c},module$build$src$generators$lua$lists={};module$build$src$generators$lua$lists.lists_create_empty=lists_create_empty$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_create_with=lists_create_with$$module$build$src$generators$lua$lists;
|
|
379
356
|
module$build$src$generators$lua$lists.lists_getIndex=lists_getIndex$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_getSublist=lists_getSublist$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_indexOf=lists_indexOf$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_isEmpty=lists_isEmpty$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_length=lists_length$$module$build$src$generators$lua$lists;
|
|
380
357
|
module$build$src$generators$lua$lists.lists_repeat=lists_repeat$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_reverse=lists_reverse$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_setIndex=lists_setIndex$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_sort=lists_sort$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_split=lists_split$$module$build$src$generators$lua$lists;var controls_ifelse$$module$build$src$generators$lua$logic=controls_if$$module$build$src$generators$lua$logic,module$build$src$generators$lua$logic={};module$build$src$generators$lua$logic.controls_if=controls_if$$module$build$src$generators$lua$logic;module$build$src$generators$lua$logic.controls_ifelse=controls_if$$module$build$src$generators$lua$logic;module$build$src$generators$lua$logic.logic_boolean=logic_boolean$$module$build$src$generators$lua$logic;
|
|
381
358
|
module$build$src$generators$lua$logic.logic_compare=logic_compare$$module$build$src$generators$lua$logic;module$build$src$generators$lua$logic.logic_negate=logic_negate$$module$build$src$generators$lua$logic;module$build$src$generators$lua$logic.logic_null=logic_null$$module$build$src$generators$lua$logic;module$build$src$generators$lua$logic.logic_operation=logic_operation$$module$build$src$generators$lua$logic;module$build$src$generators$lua$logic.logic_ternary=logic_ternary$$module$build$src$generators$lua$logic;var CONTINUE_STATEMENT$$module$build$src$generators$lua$loops="goto continue\n",controls_repeat$$module$build$src$generators$lua$loops=controls_repeat_ext$$module$build$src$generators$lua$loops,module$build$src$generators$lua$loops={};module$build$src$generators$lua$loops.controls_flow_statements=controls_flow_statements$$module$build$src$generators$lua$loops;module$build$src$generators$lua$loops.controls_for=controls_for$$module$build$src$generators$lua$loops;
|
|
@@ -385,8 +362,8 @@ module$build$src$generators$lua$math.math_on_list=math_on_list$$module$build$src
|
|
|
385
362
|
module$build$src$generators$lua$math.math_trig=math_single$$module$build$src$generators$lua$math;var procedures_defnoreturn$$module$build$src$generators$lua$procedures=procedures_defreturn$$module$build$src$generators$lua$procedures,module$build$src$generators$lua$procedures={};module$build$src$generators$lua$procedures.procedures_callnoreturn=procedures_callnoreturn$$module$build$src$generators$lua$procedures;module$build$src$generators$lua$procedures.procedures_callreturn=procedures_callreturn$$module$build$src$generators$lua$procedures;
|
|
386
363
|
module$build$src$generators$lua$procedures.procedures_defnoreturn=procedures_defreturn$$module$build$src$generators$lua$procedures;module$build$src$generators$lua$procedures.procedures_defreturn=procedures_defreturn$$module$build$src$generators$lua$procedures;module$build$src$generators$lua$procedures.procedures_ifreturn=procedures_ifreturn$$module$build$src$generators$lua$procedures;var text_prompt$$module$build$src$generators$lua$text=text_prompt_ext$$module$build$src$generators$lua$text,module$build$src$generators$lua$text={};module$build$src$generators$lua$text.text=text$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_append=text_append$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_changeCase=text_changeCase$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_charAt=text_charAt$$module$build$src$generators$lua$text;
|
|
387
364
|
module$build$src$generators$lua$text.text_count=text_count$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_getSubstring=text_getSubstring$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_indexOf=text_indexOf$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_isEmpty=text_isEmpty$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_join=text_join$$module$build$src$generators$lua$text;
|
|
388
|
-
module$build$src$generators$lua$text.text_length=text_length$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.
|
|
389
|
-
module$build$src$generators$lua$text.
|
|
365
|
+
module$build$src$generators$lua$text.text_length=text_length$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_print=text_print$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_prompt=text_prompt_ext$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_prompt_ext=text_prompt_ext$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_replace=text_replace$$module$build$src$generators$lua$text;
|
|
366
|
+
module$build$src$generators$lua$text.text_reverse=text_reverse$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_trim=text_trim$$module$build$src$generators$lua$text;var module$build$src$generators$lua$variables={};module$build$src$generators$lua$variables.variables_get=variables_get$$module$build$src$generators$lua$variables;module$build$src$generators$lua$variables.variables_set=variables_set$$module$build$src$generators$lua$variables;var module$build$src$generators$lua$variables_dynamic={};module$build$src$generators$lua$variables_dynamic.variables_get_dynamic=variables_get$$module$build$src$generators$lua$variables;module$build$src$generators$lua$variables_dynamic.variables_set_dynamic=variables_set$$module$build$src$generators$lua$variables;var luaGenerator$$module$build$src$generators$lua=new LuaGenerator$$module$build$src$generators$lua$lua_generator,generators$$module$build$src$generators$lua=Object.assign({},module$build$src$generators$lua$lists,module$build$src$generators$lua$logic,module$build$src$generators$lua$loops,module$build$src$generators$lua$math,module$build$src$generators$lua$procedures,module$build$src$generators$lua$text,module$build$src$generators$lua$variables,module$build$src$generators$lua$variables_dynamic);
|
|
390
367
|
for(const a in generators$$module$build$src$generators$lua)luaGenerator$$module$build$src$generators$lua.forBlock[a]=generators$$module$build$src$generators$lua[a];var module$build$src$generators$lua={};module$build$src$generators$lua.LuaGenerator=LuaGenerator$$module$build$src$generators$lua$lua_generator;module$build$src$generators$lua.Order=Order$$module$build$src$generators$lua$lua_generator;module$build$src$generators$lua.luaGenerator=luaGenerator$$module$build$src$generators$lua;
|
|
391
368
|
module$build$src$generators$lua.__namespace__=$;
|
|
392
369
|
return module$build$src$generators$lua;
|