Neil Fraser
ba18ae2159
Add STATEMENT_SUFFIX
...
Also remove need to manually indent INFINITE_LOOP_TRAP. This is a breaking change for Python users of this property. However, very few users of this property exist, given that the existing code breaks if the block ID has a $ in it (also fixed in this PR).
2019-05-14 17:19:31 -07:00
tojimjiang
25b883d920
Remove Python references in Dart math generator
...
Resolves #2329
Commit in develop branch
2019-03-27 15:48:03 -07:00
Rachel Fenichel
e4690902de
Merge pull request #2179 from DubeySandeep/PHP-text-outerOrder
...
Fix #2161 : Changes outerOrder for PHP/text component.
2018-12-17 13:28:20 -08:00
Sandeep Dubey
8d09419afc
Changes outerOrder for PHP/text component.
2018-12-16 22:32:19 +05:30
alschmiedt
f06bee4eca
Fixes pull request comments
2018-11-27 09:55:15 -08:00
Abby Schmiedt
26a4774b35
Adds option to generate code for a single block
2018-11-21 09:00:29 -08:00
Andrew n marshall
9252c947bc
Add new atan2 block (PR #2079 )
...
Merge pull request from nadyafebi/add-atan2-support-1835
2018-10-16 11:27:00 -07:00
Andrew n marshall
58bfab7c6c
Math.PI => Math.pi
...
The Dart test was failing prior to this.
2018-10-16 11:25:10 -07:00
Neil Fraser
4f714716a5
Upgrade to dart 2.0
2018-10-15 16:17:50 -07:00
Nadya Febiana Djojosantoso
d3deeedc02
Add math_atan2 Python generator
2018-10-11 14:34:26 -07:00
Nadya Febiana Djojosantoso
c61822befa
Add math_atan2 PHP generator
2018-10-11 14:20:27 -07:00
Nadya Febiana Djojosantoso
683a738166
Add math_atan2 Lua generator
2018-10-11 14:19:40 -07:00
Nadya Febiana Djojosantoso
fd0bcabacd
Add math_atan2 Dart generator
2018-10-11 14:19:01 -07:00
Nadya Febiana Djojosantoso
23bb0e00d9
Add math_atan2 JavaScript generator
2018-10-11 14:18:25 -07:00
Neil Fraser
f3a76cc288
Remove unneeded String() and str() calls.
...
String literals in JS and Python don’t need to be coerced to strings.
2018-09-25 14:00:00 -07:00
Andrew n marshall
f42291ea64
Do not escape % in python strings. ( #1982 )
...
Rebase of PR-1890, commit 793055… from Ellipsis753:patch-1
2018-07-20 15:54:11 -07:00
Neil Fraser
c8bfc888c8
Throw errors instead of strings. ( #1974 )
...
Blocks and generators
2018-07-16 16:33:44 -07:00
Neil Fraser
6203cadcae
Move away from math.log10 and math.pow in Lua generators.
...
Fixes #1695
2018-03-12 11:35:29 -07:00
Neil Fraser
10dbf2cc6d
Random typos.
...
@rachel-fenichel LGTMs in person.
2018-02-21 17:47:01 -08:00
Rachel Fenichel
6d96e4003b
Merge pull request #1576 from rachel-fenichel/bugfix/1574
...
Add generators for dynamic variable blocks.
2018-01-29 16:20:28 -08:00
Rachel Fenichel
bce24fef6b
Add generators for dynamic variable blocks.
2018-01-26 17:10:45 -08:00
Rachel Fenichel
3b168f5370
Fix #1538
2018-01-26 15:20:19 -08:00
Neil Fraser
a4ec65d85d
Improve support >ES5 and Node.
...
Adds ‘yield’ and ‘**’ to JS order list.
Build generates files (more) parsable by Node.
This PR should have no effect on existing code.
2018-01-25 11:47:11 -08:00
jschanker
f0b68fad66
Fixed JS/PHP generators for math_number
...
It was returning ORDER_ATOMIC for the block for any number; changed it so that it now returns ORDER_UNARY_NEGATION for negative numbers.
2018-01-25 09:02:38 -08:00
Nat Zimmermann
9ce13d8883
Add ORDER_AWAIT constant to JavaScript generator
2018-01-25 09:02:18 -08:00
Rachel Fenichel
dc5267da65
Merge pull request #1547 from rachel-fenichel/feature/dev_var_ordering
...
Declare developer variables before user variables. Rebuild generators.
2018-01-18 10:24:37 -08:00
Rachel Fenichel
9a3dc70031
Declare developer variables before user variables. Rebuild generators.
2018-01-17 17:38:26 -08:00
Rachel Fenichel
376b3c4b44
Update procedure generators for PHP and Python to declare developer variables as globals
2018-01-17 13:04:41 -08:00
Rachel Fenichel
9b091a8f9e
Update procedure generators
2018-01-02 16:27:17 -08:00
Rachel Fenichel
24cf1cf7dd
Remove TODO and get rid of unnecessary wrapper call.
2017-12-21 10:54:54 -08:00
Rachel Fenichel
0a0b6f3848
Add error; python and php tests pass.
2017-12-20 16:28:14 -08:00
Rachel Fenichel
fced496d28
Lua generator tests pass with new variables
2017-12-20 15:23:05 -08:00
Rachel Fenichel
3d0567fe46
JS and Dart generator tests pass
2017-12-20 15:14:37 -08:00
Nicole Parrot
97ce5b3e4f
Fix indentation for function blocks with return statements ( #1362 )
...
* fix indentation for the return statement in function blocks that return a value
* Fix hard-coded autoindent, and swap it for Blockly.PHP.INDENT
* Fix hard-coded 2 spaces indent and use language-appropriate global indent
2017-10-17 15:20:11 -07:00
Nicole Parrot
4df6f11f8a
Do not assume an indentation of 2 spaces when writing the global variables at the top of a function declaration. ( #1356 )
2017-10-10 16:06:40 -07:00
Neil Fraser
f34a2c2ed4
Properly escape IDs in procedure generators. ( #1305 )
...
Issue #251 and #1304 .
2017-09-04 08:51:16 -07:00
marisaleung
47872b4ada
Fix code generation for procedures (PHP, Python).
2017-07-17 11:42:36 -07:00
Tony Lian
071798546c
Modify the colour_rgb function to match other languages ( #1210 )
...
There are two tests fail before modifying the color_rgb function because it behaves differently in Dart and in other languages. In Dart, this function takes parameters ranging from 0 to 1.0 while in other languages such as Lua the counterpart function takes parameters ranging from 0 to 100. Now I have modified it to let it behave the same as other languages.
2017-07-11 16:43:50 -07:00
marisaleung
693bdbb10e
Fix python and php procedures.
2017-06-26 11:51:32 -07:00
marisaleung
dc97909abd
Edit generators to read in Variable Models.
2017-05-15 12:19:04 -07:00
marisaleung
d903b5e86b
VariableMap and functions added.
2017-05-03 10:51:24 -07:00
Tim Dawborn
e16058e95a
Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). ( #861 )
2017-01-25 15:02:49 -08:00
Tim Dawborn
46316c7cea
Add a block to reverse a list ( #844 )
2017-01-21 10:48:42 -08:00
Tim Dawborn
34750bccd8
New blocks text_count, text_replace, and text_reverse ( #830 )
...
Includes generators for all languages and units tests on those generators.
2017-01-20 16:08:27 -08:00
Neil Fraser
90b63f49cb
Python false is False. Issue #828 .
2017-01-16 09:33:02 -08:00
Tim Dawborn
48e58859fe
Change the Python codegen for string quoting to match the behaviour of repr on a string in CPython.
2016-12-22 15:51:23 +11:00
Andrew n marshall
e5d25bb686
String reference in JSON string messages ( #741 )
...
* Adds message references to message string interpolation, in the form of %{BKY_STRING}.
* Re-adding CONTROLS_IFELSE block using the new syntax, referencing to CONTROL_IF equivalents.
2016-11-15 15:51:51 -08:00
Rachel Fenichel
82261e3d68
Remove ifelse block and messages'
2016-11-11 17:21:29 -08:00
Andrew n marshall
72ff6d9ead
Adding controls_ifelse block ( #722 )
...
Adding controls_ifelse, an if/else block that is loaded from JSON and does not use mutators. This gives "else" capability to Android & iOS implementations, which don't support JavaScript mutators.
Added this block to the playground simple toolbox and all generators.
2016-10-31 11:00:39 -07:00
RoboErikG
35d1fa575e
Merge pull request #679 from drigz/bugfix/677
...
Don't modify workspace.variableList in generators
2016-10-11 12:31:13 -07:00