Line wrap comments in generated code.

This commit is contained in:
Neil Fraser
2016-06-08 00:12:58 -07:00
parent 4ba2b1bea3
commit 3012d52808
7 changed files with 180 additions and 155 deletions

View File

@@ -70,6 +70,13 @@ Blockly.Generator.prototype.STATEMENT_PREFIX = null;
*/
Blockly.Generator.prototype.INDENT = ' ';
/**
* Maximum length for a comment before wrapping. Does not account for
* indenting level.
* @type {number}
*/
Blockly.Generator.prototype.COMMENT_WRAP = 60;
/**
* Generate code for all blocks in the workspace to the specified language.
* @param {Blockly.Workspace} workspace Workspace to generate code from.