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

Constants > TokenTypes Object lacks consistency #272

Open
1 task done
HimanshuAgrahari07 opened this issue Sep 3, 2022 · 0 comments
Open
1 task done

Constants > TokenTypes Object lacks consistency #272

HimanshuAgrahari07 opened this issue Sep 3, 2022 · 0 comments

Comments

@HimanshuAgrahari07
Copy link

Description

The TokenTypes object with constant values lacks consistency

File path: packages/parser/src/constants/bhaiLangSpec.ts

Issue: Exported object name says TokenTypes, but all the keys in the object doesn't follow same pattern
Ex:

  • Few that follows suffix as TYPE

    • HI_BHAI_TYPE
    • BHAI_YE_HAI_TYPE
    • ADDITIVE_OPERATOR_TYPE
  • Few that doesn't follow suffix as TYPE

    • AGAR_BHAI
    • WARNA_BHAI
    • LOGICAL_OR

Impact of inconsistency: Misleading keys of exported object.

Suggesation: We can have consistent keys, all of them having the suffix as TYPE

Domain

Bhai Lang

Type of Contribution

Refactoring

Code of Conduct

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