We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The parser states can now be expressed with the binary litteral operator: https://github.com/nfroidure/svg-pathdata/blob/master/src/SVGPathDataParser.ts#L530-L541 http://2ality.com/2015/04/numbers-math-es6.html
The text was updated successfully, but these errors were encountered:
It's not quite clear to me why they're implemented as a bit mask anyway, apart from the relative flag, all the other states are mutually exclusive?
Sorry, something went wrong.
These states are also used and stored in the same variabl by the parser https://github.com/nfroidure/svg-pathdata/blob/master/src/SVGPathDataParser.ts#L511-L525
That said, the bit mask was really necessary to store the parser state, it doesn't save that much memory.
You can do it with no explicit state var at all :-P https://github.com/nfroidure/svg-pathdata/blob/simpler-parser/src/SVGPathDataParser.ts
No branches or pull requests
The parser states can now be expressed with the binary litteral operator:
https://github.com/nfroidure/svg-pathdata/blob/master/src/SVGPathDataParser.ts#L530-L541
http://2ality.com/2015/04/numbers-math-es6.html
The text was updated successfully, but these errors were encountered: