LanguageDefinition

public class LanguageDefinition extends Object

Defines the core language file to be used in code generation. To be used by the generator Blockly needs to know the path to the file and the object that has the generator functions. For example: {"javascript_compressed.js", "Blockly.JavaScript"}.

Field Summary

public static final LanguageDefinition JAVASCRIPT_LANGUAGE_DEFINITION Standard definition for the JavaScript language generator.
public final String mGeneratorRef The Generator object that is defined by the file and should be called to perform the code generation, such as "Blockly.JavaScript".
public final String mLanguageFilename The path to the language generation file relative to file:///android_assets/background_compiler.html.

Public Constructor Summary

LanguageDefinition(String filename, String generatorObject)
Create a language definition with the given filename and generator object.

Inherited Method Summary

Fields

public static final LanguageDefinition JAVASCRIPT_LANGUAGE_DEFINITION

Standard definition for the JavaScript language generator.

public final String mGeneratorRef

The Generator object that is defined by the file and should be called to perform the code generation, such as "Blockly.JavaScript".

public final String mLanguageFilename

The path to the language generation file relative to file:///android_assets/background_compiler.html.

Public Constructors

public LanguageDefinition (String filename, String generatorObject)

Create a language definition with the given filename and generator object.

Parameters
filename The path to the language generator file relative to file:///android_assets/background_compiler.html.
generatorObject The generator object provided by the file, such as "Blockly.JavaScript"