123456789101112131415161718192021222324252627282930 |
- /**
- * @license Licensed under the Apache License, Version 2.0 (the "License"):
- * http://www.apache.org/licenses/LICENSE-2.0
- */
- /**
- * @fileoverview Generating Arduino code for variables blocks.
- */
- 'use strict';
- goog.provide('Blockly.Python.define');
- goog.require('Blockly.Python');
- Blockly.Python['define'] = function(block) {
- var defineINIT = Blockly.Python.valueToCode(block, 'define_init', Blockly.Python.ORDER_ATOMIC);
- var defineVAR = Blockly.Python.valueToCode(block, 'define_variable', Blockly.Python.ORDER_ATOMIC);
- // TODO: Assemble JavaScript into code variable.
- Blockly.Python.addDeclaration('define_init', '#define\t' + defineINIT + '\t' + defineVAR, false);
- var code = '';
- return code;
- };
- Blockly.Python['define_var'] = function(block) {
- var defVariable = Blockly.Python.valueToCode(block, 'define_variable', Blockly.Python.ORDER_ATOMIC);
- // TODO: Assemble JavaScript into code variable.
- var code = '';
- // TODO: Change ORDER_NONE to the correct strength.
- return [code, Blockly.Python.ORDER_NONE];
- };
|