Skip to content

RFC: Schema parser #45

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

Merged
merged 5 commits into from
Jan 9, 2017
Merged

RFC: Schema parser #45

merged 5 commits into from
Jan 9, 2017

Conversation

swolchok
Copy link
Contributor

@swolchok swolchok commented Dec 24, 2016

This adds support for the RFC schema language additions in graphql/graphql-spec#90 .

  • AST for schema language
  • Parsing for schema language
  • API for parsing w/schema language enabled
  • Simple tests
  • JsonVisitor support for schema language
  • Test schema-kitchen-sink.graphql in automation (after adding kitchen-sink.graphql automated test on master)

Should fix #22 when complete.

@swolchok swolchok force-pushed the schema-parser branch 3 times, most recently from f8251ce to 429f22a Compare December 27, 2016 23:48
@swolchok swolchok mentioned this pull request Dec 27, 2016
@swolchok
Copy link
Contributor Author

Planning to hold off merging this until folks get a chance to return from the holidays.

yylex_destroy(scanner);
return result;
}

std::unique_ptr<ast::Node> parseFile(FILE *file, const char **error) {
std::unique_ptr<ast::Node> parseString(const char *text, const char **error) {
return parseStringImpl(text, error, false);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it's hard to guess what is the meaning of the boolean without reading a type signature of parseStringImpl, so it's usually a good practice to leave a comment /* enableSchema */ right next to a parameter.

@@ -1,6 +1,6 @@
#line 1 "lexer.cpp"
#line 1 "/Users/swolchok/libgraphqlparser/lexer.cpp"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's probably not something you'd like to leave :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, this keeps cropping up. cmake seems to run the tools by passing their absolute path. thanks.

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.

Schema
3 participants