don't hardcode Element classname#164
Conversation
Imran-imtiaz48
left a comment
There was a problem hiding this comment.
The pull request introduces significant changes to the codebase, focusing on improving the handling of tokenization, algebraic literals, and operator syntax. The updates streamline the mapping of algebraic literals to coefficients and enhance string template support, although the latter still requires fundamental changes for more robust implementation. The modifications also refine the processing of unary and binary operators, improving the overall clarity and functionality of the tokenizer. However, it would be beneficial to add more comments or documentation to explain the logic behind some of the changes, especially for complex transformations like unary minus and plus handling. Additionally, testing these changes thoroughly is crucial to ensure no unintended regressions occur, particularly in edge cases.
Due to the eval in the inline function, rollup (and likely other bundlers/minimizers) doesn't realize it shouldn't rename the Element class. Fortunately, this.name works in a static context so we can just use whatever the current classname is instead.