Commit Graph

218 Commits

Author SHA1 Message Date
Neil Fraser
fdc9e2ba3b Fix 'this' warning on aggressive compile. 2016-06-28 14:36:54 -07:00
Neil Fraser
62a644686c Routine recompile. 2016-06-27 17:40:30 -07:00
Neil Fraser
16fef9f2e2 Reduce more unneeded parentheses in JS and Python. 2016-06-27 15:52:35 -07:00
Neil Fraser
4b319d461d Reduce unneeded parentheses in JS and Python. 2016-06-20 17:34:36 -07:00
Neil Fraser
fd6f743f0e Remove unneeded generated parens around function calls in indexOf blocks. 2016-06-13 18:49:18 -07:00
Neil Fraser
477562b597 Prevent collisions between user functions and helper functions. 2016-06-12 12:19:14 -07:00
Neil Fraser
44f30cb997 Merge branch 'master' into develop 2016-06-10 13:47:58 -07:00
Neil Fraser
0c92ce911f Fix sort block in JS to satisfy tests. 2016-06-09 22:14:58 -07:00
Monica Kozbial
04d6d119c0 Add indexing setting for JavaScript Generation (#419)
Adding setting to allow for switching between zero and one based indexing for Blockly Blocks such that the generated code will use this flag to determine whether one based or zero based indexing should be used. One based indexing is enabled by default.
2016-06-09 18:09:37 -07:00
Neil Fraser
ef417d7a60 Fix precedence on isIndex blocks. 2016-06-09 18:04:14 -07:00
Neil Fraser
652e57bc38 Generate for loops on one line. 2016-06-09 17:27:27 -07:00
Neil Fraser
3012d52808 Line wrap comments in generated code. 2016-06-08 00:12:58 -07:00
Neil Fraser
4ba2b1bea3 Use a comment block for function comments in generated JS, Python and Dart. 2016-06-06 00:19:36 -07:00
Neil Fraser
bfa842c9a8 Remove claim that good.string.quote should be used. 2016-06-02 16:31:49 -07:00
Neil Fraser
32192850ad Generated JS helper functions should be camelCase.
Complying with Google style guide.
2016-06-01 17:18:18 -07:00
Neil Fraser
7d94a34984 Initialize generated JS and Dart variables in one line. 2016-05-17 10:13:37 -07:00
Dan LaLiberte
f28928db83 Update pull request, mostly whitespace and comments. 2016-05-06 10:37:19 -04:00
Daniel LaLiberte
73953e9e53 Comment tweaks. 2016-05-05 18:16:20 -04:00
Daniel LaLiberte
8904fd1b9c Fix Dart and PHP lists_sort.
Add generator tests.
2016-05-05 17:58:08 -04:00
Dan LaLiberte
c1cfec8dbd Add lists_sort block. 2016-05-04 17:03:24 -04:00
Neil Fraser
bd779ad938 Respect generator.INDENT setting. Issue #331. 2016-04-14 01:14:37 -07:00
Neil Fraser
a7892d1aee Raise error if statement block returns tuple. 2016-03-18 14:17:31 -07:00
Rodrigo Queiro
37d3ecc304 Fix JSDoc syntax on Blockly.Lua.lists.getIndex_
Also fix a return type warning in one of the branches.
2016-03-14 15:08:49 +01:00
Rodrigo Queiro
0aec80a088 Add missing comma to Lua reserved words
This meant that variables could be called _, conflicting with use in Lua
as a dummy variable, and in particular with scrubNakedValue.
2016-03-14 15:07:30 +01:00
Rodrigo Queiro
a5d3f340e5 Add a Lua code generator
This is based on the JS generator, with a lot of inspiration from Ellen
Spertus's blockly-lua: https://github.com/espertus/blockly-lua

All unit tests pass with Lua 5.3.2.
2016-03-10 10:24:25 +01:00
Neil Fraser
1facefc3cf Support Python 3 (and 2) 2016-01-04 14:38:41 -08:00
Neil Fraser
2f30034983 Fix infinity in Python, PHP, and Dart. 2015-10-24 23:53:07 -04:00
Neil Fraser
54ffdc5926 Don't allow shadow blocks to be deleted. 2015-10-21 12:58:52 -07:00
Neil Fraser
c413fa1678 Fix JS and PHP list/text blocks.
The length and is_empty blocks can take either text or lists.
2015-10-03 07:45:16 -07:00
Neil Fraser
cb26a13b00 Fix generators for deprecated controls_repeat block. 2015-09-07 19:42:22 -07:00
Neil Fraser
0274763beb Clean up temporary generator data. 2015-08-14 18:26:05 -07:00
Neil Fraser
bafb3016fd Remove duplicated generators. 2015-07-23 13:11:51 -07:00
Neil Fraser
e0f90e6e33 Adding more type documentation. 2015-07-13 15:03:22 -07:00
Neil Fraser
d8a72df17f Generalize PHP $ hack for variables. 2015-07-02 19:59:32 -07:00
Neil Fraser
d819db2acf Lint corrections. 2015-07-02 19:41:10 -07:00
Neil Fraser
edd3e3bf33 Lint corrections. 2015-06-17 13:05:24 -07:00
Neil Fraser
760d203c06 Fix PHP's blend colour block. 2015-06-04 15:41:09 -07:00
Neil Fraser
c95865a181 Fix PHP's RGB colour block. 2015-06-04 15:12:37 -07:00
daarond
d8468e3bf4 print statement fix from Neil's comments 2015-05-24 11:27:27 -05:00
daarond
58b41c9c46 changes from Neil's comments 2015-05-21 11:26:32 -05:00
daarond
6246631240 fixing constructor variable 2015-05-19 09:16:54 -05:00
daarond
b797f32e80 fixing reserved words from revert 2015-05-15 17:50:42 -05:00
daarond
64c35268d9 fixing name 2015-05-15 17:09:58 -05:00
daarond
2fc79ecdf3 fixing lists to pass tests 2015-05-13 16:05:04 -05:00
daarond
0faf2b7a53 still working on tests, lists are the only unfinished 2015-05-12 21:35:49 -05:00
daarond
867d6c03da changes from Neil's comments 2015-05-12 16:20:57 -05:00
daarond
37faa9937a more debugging 2015-05-11 21:18:12 -05:00
daarond
5e7f92cec3 more debugging 2015-05-10 00:40:01 -05:00
daarond
da2e0710bf fixing some items 2015-05-09 17:48:55 -05:00
daarond
f0c837bb2d starting php support addition 2015-05-09 16:52:36 -05:00