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

Byte slice references #8

Merged
merged 7 commits into from
Jan 17, 2019

Conversation

jensneuse
Copy link
Member

This PR adds start and end positions to tokens. It'll enable the parser to know the exact structure of a graphql document.

On the way to the implementation the token lexer got refactored to simplify the code and have less moving parts around. The lexer does no longer emit tokens with byte slices but will just return a reference to the start and end in the input byte slice. This does not only simplify the lexer codebase but also improves performance by ~10% which isn't too bad.

For Usability reasons a ByteSlice lookup method has been added to both, the parser and lexer which lets the user easily transform a ByteSliceReference to a ByteSlice in case the latter is needed.

@jensneuse jensneuse merged commit 5397173 into add-start-end-position-to-nodes Jan 17, 2019
@jensneuse jensneuse deleted the byte-slice-references branch January 17, 2019 21:29
jensneuse added a commit that referenced this pull request Mar 11, 2020
devsergiy pushed a commit that referenced this pull request Aug 22, 2023
* re-enable normalization with inline fragments

* chore: temporarily comment out broken tests

* fix field selection merging

* fix validation tests

---------

Co-authored-by: David Stutt <david@wundergraph.com>
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

Successfully merging this pull request may close these issues.

1 participant