mirror of
https://github.com/google/blockly.git
synced 2026-01-09 18:10:08 +01:00
Use conventional prefix/suffix for function calls.
Previously a function call with no return value generated: prefix(); suffix(); function(); The intent was so the prefix and suffix calls in the function body wouldn’t overlap with the prefix and suffix calls of the function call. However, this is doomed to be inconsistent with a function call with a return value: prefix(); print(function()); suffix(); Thus since overlaping must exist, both types of function calls should have consistent suffix locations.
This commit is contained in:
@@ -642,12 +642,6 @@ Blockly.Blocks['procedures_callnoreturn'] = {
|
||||
this.previousEnabledState_ = true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Don't automatically add STATEMENT_PREFIX and STATEMENT_SUFFIX to generated
|
||||
* code. These will be handled manually in this block's generators.
|
||||
*/
|
||||
suppressPrefixSuffix: true,
|
||||
|
||||
/**
|
||||
* Returns the name of the procedure this block calls.
|
||||
* @return {string} Procedure name.
|
||||
|
||||
Reference in New Issue
Block a user