Skip to content

Invoke the 1.8 or 1.9 parser #26

Open

Description

@ftomassetti

Excuse my simple question but how do I specify which version of the parser do I want to use? Wouldn't be useful to have it in the README?

Activity

  1. ftomassetti commented on Sep 4, 2013

    @ftomassetti
    Author

    Anyway, it should default to version 1.9 and I find a NotNode in my AST while the documentation of NotNode states that it should appear only in 1.8 ASTs

  2. chrisseaton commented on Sep 4, 2013

    @chrisseaton
    Contributor

    The parser version is specified as a CompatVersion object - https://github.com/jruby/jruby-parser/blob/master/src/org/jrubyparser/CompatVersion.java. That goes into a ParserConfiguration - https://github.com/jruby/jruby-parser/blob/master/src/org/jrubyparser/parser/ParserConfiguration.java - and then into Parser - https://github.com/jruby/jruby-parser/blob/master/src/org/jrubyparser/Parser.java.

    1.8 is the default at the moment, but I think all the current use cases will be very explicit about what version they're targeting so nobody's probably given the default too much thought. But why version 1.9? That's not the earliest, and it's not the current, so seems a strange choice?

    The README could admittedly use some work. If you fork the repo and put questions that you've found as you use the library, we can fill in the answers and merge.

  3. enebo commented on Sep 4, 2013

    @enebo
    Member

    1.9 is the most common version at the moment although 2.0 will be soon so if we change default (which I agree a default is probably not what should be encouraged) it should be set to 2.0.

    To be clear on your notnode question it is because it is being parsed in 1.8 mode.

    I also agree we should update the README or have a wiki page on getting up and running.

  4. ftomassetti commented on Sep 9, 2013

    @ftomassetti
    Author

    Ok, I will drop some questions on the README.

    As a user I had to look into the source code to understand the nature of some nodes. For some of them there is no Javadoc, so I had just to try them in the REPL to figure out what they used for. Maybe I could add some examples in the javadoc of the corresponding node, if you think that could help.

  5. edubkendo commented on Sep 9, 2013

    @edubkendo
    Member

    I added a bit to the README recently, also, set up wiki and added a couple pages. It would be awesome to get some more articles in the wiki and then link to those from the README as appropriate.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions