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

[codegen] separate reserved names for top identifiers and reserved names for built_value fields #340

Open
knaeckeKami opened this issue Aug 6, 2022 · 0 comments

Comments

@knaeckeKami
Copy link
Collaborator

Right now, there is one list of reserved names which get escaped when used as an identifier.
This list includes reserved keywords in dart (like class) and names which are reserved by built_value (like 'toJson') and cannot be used as name for a field in built_value.

Since we also generate top-level constants, this single list is too restrictive and might lead to escaping of names when it is not needed.

Example: It is valid to define a top-level constant with the name 'rebuild', but we would still escape the name of the top-level constants which is generated from a directive like

directive @rebuild on FIELD_DEFINITION

to Grebuild

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

No branches or pull requests

1 participant