Skip to content
New issue

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

Object's prototype methods return undefined for token type #118

Open
ozanbatuhanceylan opened this issue Apr 6, 2022 · 0 comments
Open

Comments

@ozanbatuhanceylan
Copy link

I wanted to add custom toLocaleString method as expression but i realized that createToken function checks elements of grammar to identify token type.

else if (this._grammar.elements[element]) {
        token.type = this._grammar.elements[element].type;
}

Elements don't have toLocaleString key but due to object inheritance it has toLocaleString method and it returns undefined for type.

I want to make sure that should i define reserved keywords for naming custom expressions or is this a bug which is have to fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant