A set of helper functions used by the console.

Static variables

staticinterp:Interp

The custom hscript interpreter to run the haxe code from the parser.

Static methods

staticgetFields(Object:Dynamic):Array<String>

staticinit():Void

Sets up the hscript parser and interpreter.

staticinlinelog(Text:Dynamic):Void

Shortcut to log a text with the Console LogStyle.

Parameters:

Text

The text to log.

staticparseCommand(Input:String):Expr

Converts the input string into its AST form to be executed.

Parameters:

Input

The user's input command.

Returns:

The parsed out AST.

staticregisterFunction(FunctionAlias:String, Function:Dynamic):Void

Register a new function to use in any command.

Parameters:

FunctionAlias

The name with which you want to access the function.

Function

The function to register.

staticregisterObject(ObjectAlias:String, AnyObject:Dynamic):Void

Register a new object to use in any command.

Parameters:

ObjectAlias

The name with which you want to access the object.

AnyObject

The object to register.

staticrunCommand(Input:String):Dynamic

Parses and runs the input command.

Parameters:

Input

The user's input command.

Returns:

Whatever the input code evaluates to.

staticrunExpr(expr:Expr):Dynamic

Runs the input expression.

Parameters:

Parsed

The parsed form of the user's input command.

Returns:

Whatever the input code evaluates to.