graphql-elixir / graphql

GraphQL Elixir
Other
859 stars 47 forks source link

Support line numbers in parser #32

Open joshprice opened 8 years ago

joshprice commented 8 years ago

Also column numbers if possible if leex supports this

joshprice commented 8 years ago

Would like to integrate https://github.com/asonge/graphql at some point as a configurable parser option, this will allow better error messages in the absence of being able to make leex and yecc do this.

joshprice commented 8 years ago

Integrating with https://github.com/aarvay/graphql_parser is also an option but less desirable in production because of the ability of NIF to crash entire nodes

bruce commented 8 years ago

Some notes:

joshprice commented 8 years ago

I don't think I recorded it anywhere but @rvirding made a comment in a talk some time ago about fixing leex to record column numbers. Like you I hunted for it but found no trace of this actually happening. Last time I looked nothing had happened on leex in GitHub for quite some time.

joshprice commented 8 years ago

Not sure what you mean by Dec?

Suspect a configurable parser would be a transient option in order to perform benchmarking and other comparisons (error msgs, etc). Once this was done, a single parser should emerge victorious from the battle.

That said, they all have rather different features, so I'd probably leave a fairly trivial config in place even if just to track the reference parser.

To summarise the pros and cons of each:

bruce commented 8 years ago

@joshprice I meant "in December." I agree on @asonge's parser, as well. I think it probably has the best featureset, but fast custom parsers are always harder to read than configuration for parser generators.

rvirding commented 8 years ago

Re leex, no nothing has happened with it for a while, mainly due to lack of time, not lack of interest. I will fix it when I get the time.

joshprice commented 8 years ago

@rvirding thanks so much for the update, is there any context you might be able to provide so that someone else might be able to look into it?

joshprice commented 8 years ago

I've opened https://github.com/rvirding/leex/issues/3 to track this