-
Notifications
You must be signed in to change notification settings - Fork 617
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fec3c70
commit efee67a
Showing
4 changed files
with
67 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ import { registerFieldColour } from '../field_colour'; | |
import { Generators } from './generatorUtils'; | ||
|
||
|
||
const BLOCK_NAME = 'colour_blend'; | ||
export const BLOCK_NAME = 'colour_blend'; | ||
|
||
// Block for blending two colours together. | ||
const jsonDef = | ||
|
@@ -51,9 +51,9 @@ const jsonDef = | |
|
||
/** | ||
* Javascript generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The JavascriptGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function jsGenerator( | ||
block: Block, | ||
|
@@ -90,9 +90,9 @@ export function jsGenerator( | |
|
||
/** | ||
* Dart generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The DartGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function dartGenerator( | ||
block: Block, | ||
|
@@ -140,9 +140,9 @@ String ${generator.FUNCTION_NAME_PLACEHOLDER_}(String c1, String c2, num ratio) | |
|
||
/** | ||
* Lua generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The LuaGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function luaGenerator( | ||
block: Block, | ||
|
@@ -179,9 +179,9 @@ export function luaGenerator( | |
|
||
/** | ||
* PHP generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The PhpGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function phpGenerator( | ||
block: Block, | ||
|
@@ -219,9 +219,9 @@ export function phpGenerator( | |
|
||
/** | ||
* Python generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The PythonGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function pythonGenerator( | ||
block: Block, | ||
|
@@ -255,7 +255,7 @@ export function pythonGenerator( | |
const definitionMap = | ||
BlocklyCommon.createBlockDefinitionsFromJsonArray([jsonDef]); | ||
|
||
export const blockDef = definitionMap[BLOCK_NAME] | ||
export const blockDefinition = definitionMap[BLOCK_NAME] | ||
|
||
/** | ||
Check warning on line 260 in plugins/field-colour/src/blocks/colourBlend.ts GitHub Actions / lint
|
||
* Install the `colour_blend` block and all of its dependencies. | ||
|
@@ -271,4 +271,4 @@ export function installBlock(gens: Generators = {}) { | |
if (gens.lua) gens.lua.forBlock[BLOCK_NAME] = luaGenerator; | ||
if (gens.php) gens.php.forBlock[BLOCK_NAME] = phpGenerator; | ||
if (gens.python) gens.python.forBlock[BLOCK_NAME] = pythonGenerator; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,9 +37,9 @@ const jsonDef = | |
|
||
/** | ||
* Javascript generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The JavascriptGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function jsGenerator( | ||
block: Block, | ||
|
@@ -52,9 +52,9 @@ export function jsGenerator( | |
|
||
/** | ||
* Dart generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The DartGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function dartGenerator( | ||
block: Block, | ||
|
@@ -67,9 +67,9 @@ export function dartGenerator( | |
|
||
/** | ||
* Lua generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The LuaGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function luaGenerator( | ||
block: Block, | ||
|
@@ -82,9 +82,9 @@ export function luaGenerator( | |
|
||
/** | ||
* PHP generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The PhpGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function phpGenerator( | ||
block: Block, | ||
|
@@ -97,9 +97,9 @@ export function phpGenerator( | |
|
||
/** | ||
* Python generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The PythonGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function pythonGenerator( | ||
block: Block, | ||
|
@@ -114,7 +114,7 @@ export function pythonGenerator( | |
const definitionMap = | ||
BlocklyCommon.createBlockDefinitionsFromJsonArray([jsonDef]); | ||
|
||
export const blockDef = definitionMap[BLOCK_NAME]; | ||
export const blockDefinition = definitionMap[BLOCK_NAME]; | ||
|
||
/** | ||
Check warning on line 119 in plugins/field-colour/src/blocks/colourPicker.ts GitHub Actions / lint
|
||
* Install the `colour_picker` block and all of its dependencies. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,9 +29,9 @@ const jsonDef = | |
|
||
/** | ||
* Javascript generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The JavascriptGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function jsGenerator( | ||
block: Block, | ||
|
@@ -53,9 +53,9 @@ function ${generator.FUNCTION_NAME_PLACEHOLDER_}() { | |
|
||
/** | ||
* Dart generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The DartGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function dartGenerator( | ||
block: Block, | ||
|
@@ -85,9 +85,9 @@ String ${generator.FUNCTION_NAME_PLACEHOLDER_}() { | |
|
||
/** | ||
* Lua generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The LuaGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function luaGenerator( | ||
block: Block, | ||
|
@@ -100,9 +100,9 @@ export function luaGenerator( | |
|
||
/** | ||
* PHP generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The PhpGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function phpGenerator( | ||
block: Block, | ||
|
@@ -123,9 +123,9 @@ function ${generator.FUNCTION_NAME_PLACEHOLDER_}() { | |
|
||
/** | ||
* Python generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The PythonGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function pythonGenerator( | ||
block: Block, | ||
|
@@ -143,7 +143,7 @@ export function pythonGenerator( | |
const definitionMap = | ||
BlocklyCommon.createBlockDefinitionsFromJsonArray([jsonDef]); | ||
|
||
export const blockDef = definitionMap[BLOCK_NAME]; | ||
export const blockDefinition = definitionMap[BLOCK_NAME]; | ||
|
||
/** | ||
Check warning on line 148 in plugins/field-colour/src/blocks/colourRandom.ts GitHub Actions / lint
|
||
* Install the `colour_picker` block and all of its dependencies. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,9 +50,9 @@ const jsonDef = | |
|
||
/** | ||
* Javascript generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The JavascriptGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function jsGenerator( | ||
block: Block, | ||
|
@@ -82,9 +82,9 @@ export function jsGenerator( | |
|
||
/** | ||
* Dart generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The DartGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function dartGenerator( | ||
block: Block, | ||
|
@@ -125,9 +125,9 @@ export function dartGenerator( | |
|
||
/** | ||
* Lua generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The LuaGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function luaGenerator( | ||
block: Block, | ||
|
@@ -154,9 +154,9 @@ export function luaGenerator( | |
|
||
/** | ||
* PHP generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The PhpGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function phpGenerator( | ||
block: Block, | ||
|
@@ -187,9 +187,9 @@ export function phpGenerator( | |
|
||
/** | ||
* Python generator definition. | ||
* @param block | ||
* @param generator | ||
* @returns | ||
* @param block The Block instance to generate code for. | ||
* @param generator The PythonGenerator calling the function. | ||
* @returns A tuple containing the code string and precedence. | ||
*/ | ||
export function pythonGenerator( | ||
block: Block, | ||
|
@@ -216,7 +216,7 @@ export function pythonGenerator( | |
const definitionMap = | ||
BlocklyCommon.createBlockDefinitionsFromJsonArray([jsonDef]); | ||
|
||
export const blockDef = definitionMap[BLOCK_NAME]; | ||
export const blockDefinition = definitionMap[BLOCK_NAME]; | ||
|
||
/** | ||
Check warning on line 221 in plugins/field-colour/src/blocks/colourRgb.ts GitHub Actions / lint
|
||
* Install the `colour_rgb` block and all of its dependencies. | ||
|
@@ -232,4 +232,4 @@ export function installBlock(gens: Generators = {}) { | |
if (gens.lua) gens.lua.forBlock[BLOCK_NAME] = luaGenerator; | ||
if (gens.php) gens.php.forBlock[BLOCK_NAME] = phpGenerator; | ||
if (gens.python) gens.python.forBlock[BLOCK_NAME] = pythonGenerator; | ||
} | ||
} |