Faster parsing by roughly 30%, depending on the device it may be higher / lower than that rate.
Streamlined parsing process by using BFS-style traversal, eliminating unnecessary characters checking and usage of String.unicodeScalar. See CommandParser.swift
Renamed Block -> Scope
Moved most of code in Parser class to FileEvaluator. This allows NXSS to utilize Context and passing it to child-file (@import) gracefully.
Added ability to save variables defined in main context. You can access these by using getVariableValue() or getUIColor()
Timing
Each time mentioned below is an average over 60 iterations (NapX)
Timing
Each time mentioned below is an average over 60 iterations (NapX)
••• iPhone 5s iOS 8
NXSS 1.0 0.356496433417002 0.362265757719676 0.355935045083364
NXSS 1.1 0.248373603820801 0.24366014401118 0.24286957581838
••• iPhone 6 iOS 9
NXSS 1.0 0.275886197884878 0.288693857192993 0.278284855683645
NXSS 1.1 0.22420746088028 0.212784298261007 0.211763457457225