mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
fix(generators): Improve consistency of migrated language generators (#7662)
* docs(generators): @fileoverview -> @file; delete @suppress * fix(generators): Fix return type of getAdjusted And improve its documentation too. Fix the @returns doc for PythonGenerator's getAdjustedInt but (for now) don't change the type because it does actually return numbers in some circumstances.
This commit is contained in:
committed by
GitHub
parent
ac362fd57a
commit
b198e2f4ae
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Generating Dart for colour blocks.
|
||||
* @file Generating Dart for colour blocks.
|
||||
*/
|
||||
|
||||
// Former goog.module ID: Blockly.Dart.colour
|
||||
|
||||
@@ -269,7 +269,7 @@ export class DartGenerator extends CodeGenerator {
|
||||
* @param delta Value to add.
|
||||
* @param negate Whether to negate the value.
|
||||
* @param order The highest order acting on this value.
|
||||
* @returns The adjusted value.
|
||||
* @returns The adjusted value or code that evaluates to it.
|
||||
*/
|
||||
getAdjusted(
|
||||
block: Block,
|
||||
@@ -277,7 +277,7 @@ export class DartGenerator extends CodeGenerator {
|
||||
delta = 0,
|
||||
negate = false,
|
||||
order = Order.NONE,
|
||||
): string | number {
|
||||
): string {
|
||||
if (block.workspace.options.oneBasedIndex) {
|
||||
delta--;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Generating Dart for list blocks.
|
||||
* @file Generating Dart for list blocks.
|
||||
*/
|
||||
|
||||
// Former goog.module ID: Blockly.Dart.lists
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Generating Dart for logic blocks.
|
||||
* @file Generating Dart for logic blocks.
|
||||
*/
|
||||
|
||||
// Former goog.module ID: Blockly.Dart.logic
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Generating Dart for loop blocks.
|
||||
* @file Generating Dart for loop blocks.
|
||||
*/
|
||||
|
||||
// Former goog.module ID: Blockly.Dart.loops
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Generating Dart for math blocks.
|
||||
* @file Generating Dart for math blocks.
|
||||
*/
|
||||
|
||||
// Former goog.module ID: Blockly.Dart.math
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Generating Dart for procedure blocks.
|
||||
* @file Generating Dart for procedure blocks.
|
||||
*/
|
||||
|
||||
// Former goog.module ID: Blockly.Dart.procedures
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Generating Dart for text blocks.
|
||||
* @file Generating Dart for text blocks.
|
||||
*/
|
||||
|
||||
// Former goog.module ID: Blockly.Dart.texts
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Generating Dart for variable blocks.
|
||||
* @file Generating Dart for variable blocks.
|
||||
*/
|
||||
|
||||
// Former goog.module ID: Blockly.Dart.variables
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Generating Dart for dynamic variable blocks.
|
||||
* @file Generating Dart for dynamic variable blocks.
|
||||
*/
|
||||
|
||||
// Former goog.module ID: Blockly.Dart.variablesDynamic
|
||||
|
||||
Reference in New Issue
Block a user