991 B
991 B
ESCCommand
Extends: ESCStatement < Object
Description
An ESC command
Constants Descriptions
REGEX
const REGEX: String = "^(\\s*)(?<name>[^\\s]+)(\\s(?<parameters>([^\\[]|$)+))?(\\[(?<conditions>[^\\]]+)\\])?"
Regex matching command lines
Property Descriptions
name
var name: String
The name of this command
parameters
var parameters: Array
Parameters of this command
conditions
var conditions: Array
A list of ESCConditions to run this command. Conditions are combined using logical AND
Method Descriptions
_init
func _init(command_string)
Create a command from a command string
is_valid
func is_valid() -> bool
Check, if conditions match
run
func run() -> var
Run this command