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

fix(apollo-parser): bump BANG token when creating NON_NULL_TYPE #146

Merged
merged 1 commit into from
Jan 21, 2022
Merged

Conversation

lrlna
Copy link
Member

@lrlna lrlna commented Jan 21, 2022

We are missing BANG token in the AST when a NON_NULL_TYPE gets created. Although the node created is indeed NON_NULL_TYPE, it's also important to keep the original set of tokens. The NON_NULL_TYPE after this commit looks like this:

- NON_NULL_TYPE@38..47
    - WHITESPACE@38..43 "\n    "
    - NAMED_TYPE@43..46
        - NAME@43..46
            - IDENT@43..46 "Int"
    - BANG@46..47 "!"

fixes #142

We are missing BANG token in the AST when a NON_NULL_TYPE gets created. Although the node created is indeed NON_NULL_TYPE, it's also important to keep the original set of tokens. The NON_NULL_TYPE after this commit looks like this:

```txt
- NON_NULL_TYPE@38..47
    - WHITESPACE@38..43 "\n    "
    - NAMED_TYPE@43..46
        - NAME@43..46
            - IDENT@43..46 "Int"
    - BANG@46..47 "!"
```

fixes #142
@lrlna lrlna self-assigned this Jan 21, 2022
@lrlna lrlna merged commit 07b95c1 into main Jan 21, 2022
@lrlna lrlna deleted the 142 branch January 21, 2022 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NON_NULL_TYPE node is missing BANG SyntaxKind
1 participant