ESCCompiler

Extends: Object

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.

COMMENT_REGEX

const COMMENT_REGEX: String = "^\\s*#.*$"

A RegEx for comment lines .*$’

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

replace_globals

func replace_globals(string: String) -> String

Look to see if any globals (names in braces) should be interpreted

Parameters

  • string: Text to log