Static variables

private@:value(~/^(@globals)( )*:( )*$/)staticfinalread onlyglobalsReg:EReg = ~/^(@globals)( )*:( )*$/

private@:value(~/^([\w\-]+)(![\w\-]+)?( *> *([\w\-]+))? *: *(.*)$/)staticfinalread onlylineReg:EReg = ~/^([\w\-]+)(![\w\-]+)?( *> *([\w\-]+))? *: *(.*)$/

privatestaticout:TOutput

private@:value(~/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/)staticfinalread onlyregColor:EReg = ~/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/

private@:value(~/^[ ]*(//.*)?$/)staticfinalread onlyregEmpty:EReg = ~/^[ ]*(//.*)?$/

private@:value(~/^( *)(.*)$/)staticfinalread onlyregIndent:EReg = ~/^( *)(.*)$/

private@:value(["abstract", "break", "case", "cast", "catch", "class", "continue", "default", "do", "dynamic", "else", "enum", "extends", "extern", "false", "final", "for", "function", "if", "implements", "import", "in", "inline", "interface", "is", "macro", "new", "null", "operator", "overload", "override", "package", "private", "public", "return", "static", "switch", "this", "throw", "true", "try", "typedef", "untyped", "using", "var", "while"])staticfinalread onlyreservedKeywords:Array<String> = ["abstract", "break", "case", "cast", "catch", "class", "continue", "default", "do", "dynamic", "else", "enum", "extends", "extern", "false", "final", "for", "function", "if", "implements", "import", "in", "inline", "interface", "is", "macro", "new", "null", "operator", "overload", "override", "package", "private", "public", "return", "static", "switch", "this", "throw", "true", "try", "typedef", "untyped", "using", "var", "while"]

private@:value(~/^(\?)?([\w\-]+) *: *(.*)$/)staticfinalread onlyruleReg:EReg = ~/^(\?)?([\w\-]+) *: *(.*)$/

private@:value(~/^@rules( )*:( )*$/)staticfinalread onlyrulesReg:EReg = ~/^@rules( )*:( )*$/

private@:value(["Asset", "Bool", "Color", "Float", "Int", "String"])staticfinalread onlyvalidTypes:Array<String> = ["Asset", "Bool", "Color", "Float", "Int", "String"]

Static methods

privatestaticcalculateIndentation(indentation:Int):Void

privatestaticcloneMap(map:Map<String, Node>, setInherited:Bool):Map<String, Node>

Creates a deep copy of a map (the given map must not contain values of types other than primitive types or maps).

Parameters:

setInherited

If true, set all EValue entries in the cloned map to inherited. If false, keep the inherited value as it was.

privatestaticcreateRequiredStates(selector:TSelector):Void

Create states from extended selector if they aren't defined yet.

Parameters:

null

selector

privatestaticgetCurrentPath():Array<String>

privatestaticinitParser(consecutiveRun:Bool):Void

privatestaticmergeMaps(mapBase:Map<String, Node>, mapAdd:Map<String, Node>):Map<String, Node>

Merges/Adds mapAdd onto mapBase (without changing those maps) and returns the resulting map. Usually used with mapBase being the extended map and mapAdd the actual selector's map.

privatestaticmergeSelectorsResolved(base:TSelector, extending:TSelector):Map<String, Node>

Merges the base selector on top of the extending selector (this modifies the base selector's map in place). If the extending selector is not resolved yet, resolve it first.

privatestaticparseBool(valueStr:String):Bool

privatestaticparseColor(valueStr:String):Color

Parses a color in the format #rrggbbaa or #RRGGBBAA

privatestaticparseFloat(valueStr:String):FastFloat

privatestaticparseGroup(groupName:String, indentLevel:Int, lastIndentLevel:Int):TGroup

privatestaticparseInt(valueStr:String):Int

privatestaticparseLine(line:String):Void

private@:value({ globalSelector : false })staticparseProperty(matchedReg:EReg, indentLevel:Int, lastIndentLevel:Int, globalSelector:Bool = false):Void

privatestaticparseRule(matchedReg:EReg, indentLevel:Int, lastIndentLevel:Int):Void

privatestaticparseSelector(selectorName:String, state:String, extending:String, value:String):Void

privatestaticparseString(valueStr:String):String

privatestaticparseType(tValue:TValue):Void

privatestaticparseValue(valueStr:String):TValue

privatestaticpathToString(?path:Array<String>):String

privatestaticinlineregisterSelectorState(pureSelectorName:String, state:String):Void

privatestaticresolveExtensions(selector:TSelector):Void

privatestaticresolveReferences(tValue:TValue):Void

privatestaticresolveStates(selector:TSelector):Void

privatestatictraverseByPath(map:StringMap<Node>, path:Array<String>):Node

privatestaticunindent(indentLevel:Int, lastIndentLevel:Int):Void

privatestaticvalidateNoKeyword(name:String):Void