ESCCompiler
Extends: Resource
Description
Compiler of the ESC language
Constants Descriptions
COMMAND_DIRECTORIES
const COMMAND_DIRECTORIES: String = "escoria/main/command_directories"
This must match ESCProjectSettingsManager.COMMAND_DIRECTORIES. We do not reference it directly to avoid circular dependencies.
EMPTY_REGEX
const EMPTY_REGEX: String = "^\\s*$"
A RegEx for empty lines
INDENT_REGEX
const INDENT_REGEX: String = "^(?<indent>\\s*)"
INDENT_REGEX_GROUP
const INDENT_REGEX_GROUP: String = "indent"
A RegEx for finding out the indent of a line
Method Descriptions
load_esc_file
func load_esc_file(path: String) -> ESCScript
Load an ESC file from a file resource
compile
func compile(lines: Array, path: String = "") -> ESCScript
Compiles an array of ESC script strings to an ESCScript
COMMENT_REGEX
A RegEx for comment lines .*$’