mirror of
https://github.com/google/blockly.git
synced 2026-01-06 00:20:37 +01:00
Resolve warnings in generator code (#3350)
This commit is contained in:
@@ -151,7 +151,7 @@ Blockly.Lua['lists_getIndex'] = function(block) {
|
||||
Blockly.Lua.ORDER_NONE;
|
||||
var at = Blockly.Lua.valueToCode(block, 'AT', atOrder) || '1';
|
||||
var listVar = Blockly.Lua.variableDB_.getDistinctName(
|
||||
'tmp_list', Blockly.Variables.NAME_TYPE);
|
||||
'tmp_list', Blockly.VARIABLE_CATEGORY_NAME);
|
||||
at = getIndex_(listVar, where, at);
|
||||
var code = listVar + ' = ' + list + '\n' +
|
||||
'table.remove(' + listVar + ', ' + at + ')\n';
|
||||
@@ -230,7 +230,7 @@ Blockly.Lua['lists_setIndex'] = function(block) {
|
||||
// `list` is an expression, so we may not evaluate it more than once.
|
||||
// We can use multiple statements.
|
||||
var listVar = Blockly.Lua.variableDB_.getDistinctName(
|
||||
'tmp_list', Blockly.Variables.NAME_TYPE);
|
||||
'tmp_list', Blockly.VARIABLE_CATEGORY_NAME);
|
||||
code = listVar + ' = ' + list + '\n';
|
||||
list = listVar;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user