haxiomic / haxe-glsl-parser

GLSL ES 1.0 parser in Haxe
MIT License
26 stars 7 forks source link

Allow running under non-neko interpreter. #10

Open deanm opened 7 years ago

deanm commented 7 years ago

The fallback non-neko interpreter doesn't support \s or \w in regex, or a mechanism to escape ] for use in character classes. Changes the \s and ] cases to use a str.indexOf instead of regex.

NOTE: This breaks \v and \f in the preprocessor (due to Haxe's lack of \v and \f escapes), however I haven't seen such a character in decades.

deanm commented 7 years ago

Probably want to have a careful look at this, I did it a bit quickly and didn't try to run the tests : )