forked from google/blockly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgdl_compressed.js
9 lines (8 loc) · 2.62 KB
/
gdl_compressed.js
1
2
3
4
5
6
7
8
9
// Do not edit this file; automatically generated by build.py.
'use strict';
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)};
Blockly.defineBlocksWithJsonArray([{type:"command_block",message0:"BLOCK %1 sz\u00e9less\u00e9g %2 %3 m\u00e9lys\u00e9g %4 %5 magass\u00e1g %6 %7",args0:[{type:"input_dummy"},{type:"input_dummy"},{type:"input_value",name:"X",check:"Number"},{type:"input_dummy"},{type:"input_value",name:"Y",check:"Number"},{type:"input_dummy"},{type:"input_value",name:"Z",check:"Number"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:230,tooltip:"",helpUrl:""}]);Blockly.GDL=new Blockly.Generator("GDL");
Blockly.GDL.addReservedWords("IF,THEN,ELSE,FOR,TO,STEP,NEXTPRINTBLOCK");Blockly.GDL.ORDER_ATOMIC=0;Blockly.GDL.ORDER_POWER=1;Blocklt.GDL.ORDER_MULTIPLY=2;Blocklt.GDL.ORDER_DIVIDE=Blocklt.GDL.ORDER_MULTIPLY;Blocklt.GDL.ORDER_MODULO=Blocklt.GDL.ORDER_MULTIPLY;Blocklt.GDL.ORDER_ADD=3;Blocklt.GDL.ORDER_SUBTRACT=Blocklt.GDL.ORDER_ADD;Blockly.GDL.ORDER_NONE=999;Blockly.GDL.ORDER_OVERRIDES=[];Blockly.GDL.init=function(a){};Blockly.GDL.finish=function(a){return a};
Blockly.GDL.scrubNakedValue=function(a){return a+"\n"};Blockly.GDL.quote_=function(a){return'"'+a+'"'};Blockly.GDL.scrub_=function(a,b){return b};Blockly.GDL.text_print=function(a){return"PRINT "+(Blockly.GDL.valueToCode(a,"TEXT",Blockly.GDL.ORDER_NONE)||'""')+"\n"};Blockly.GDL.text=function(a){return[Blockly.GDL.quote_(a.getFieldValue("TEXT")),Blockly.GDL.ORDER_ATOMIC]};Blockly.GDL.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));return[a,0<=a?Blockly.GDL.ORDER_ATOMIC:Blockly.GDL.ORDER_UNARY_NEGATION]};
Blockly.GDL.math_arithmetic=function(a){var b=$jscomp.makeIterator({ADD:["+",Blockly.GDL.ORDER_ADD],MINUS:["-",Blockly.GDL.ORDER_SUBTRACT],MULTIPLY:["*",Blockly.GDL.ORDER_MULTIPLY],DIVIDE:["/",Blockly.GDL.ORDER_DIVIDE],MODULO:["%",Blockly.GDL.ORDER_MODULO],POWER:["^",Blockly.GDL.ORDER_POWER]}[a.getFieldValue("OP")]),c=b.next().value;b=b.next().value;var d=Blockly.GDL.valueToCode(a,"A",b)||"0";a=Blockly.GDL.valueToCode(a,"B",b)||"0";return[d+" "+c+" "+a,b]};
Blockly.GDL.command_block=function(a){var b=Blockly.GDL.valueToCode(a,"X",Blockly.GDL.ORDER_ATOMIC)||"0",c=Blockly.GDL.valueToCode(a,"Y",Blockly.GDL.ORDER_ATOMIC)||"0";a=Blockly.GDL.valueToCode(a,"Z",Blockly.GDL.ORDER_ATOMIC)||"0";return"BLOCK "+b+", "+c+", "+a+"\n"};