YarnCommandParser
Parses Yarn command strings with support for quoted arguments and escapes.
class_name YarnCommandParser
extends RefCountedInherits from RefCounted
#Methods
#get_args(String)
static func get_args(command_text: String) -> Array[String]Parameters
command_textString
Returns Array[String]
#get_command_name(String)
static func get_command_name(command_text: String) -> StringParameters
command_textString
Returns String
#parse_to_dict(String)
Returns {"name": "command_name", "args": ["arg1", "arg2"]}.
static func parse_to_dict(command_text: String) -> DictionaryParameters
command_textString
Returns Dictionary
#parse(String)
Returns [command_name, arg1, arg2, ...]. Splits on whitespace outside quotes. Only double quotes delimit a quoted span; inside one, \\ and \" are the only escapes, and closing the quote flushes the token immediately even if more non-whitespace text follows (so text before a quote merges with it, but text after does not). Single quotes and backslashes outside quotes carry no special meaning.
static func parse(command_text: String) -> Array[String]Parameters
command_textString
Returns Array[String]
Generated from Yarn Spinner for Godot GDScript 3.3.