Code Monkey home page Code Monkey logo

tree-sitter's People

Contributors

devnote-dev avatar mdwagner avatar nobodywasishere avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tree-sitter's Issues

Catching up to other parsers

Following up from the forum discussion, the two most developed tree sitter parsers for Crystal are Keidax's implementation and Will's implementation. However, both take very different approaches when expressing the language grammar: Will's implementation (from some non-thorough reading) makes use of a lot of regex, whereas Keidax's implementation is more expression-based and even makes use of custom C code for additional grammar logic.

For these reasons, I think it would be best if we took a more balanced approach โ€“ that is, still using hand-written grammar that is based from both of these implementations. Both of them have varying techniques for expressing the language's grammar that should definitely be taken advantage of in this implementation.


Coverage

  • Primitives
    • Strings
      • Literals (quotations)
      • Percent Literals
      • Heredocs
      • Interpolation
    • Integers and Floats
    • Booleans and Nil
    • Arrays and Hashes
    • Procs
    • Chars
    • Symbols
  • Delimiters
    • Line continuations (\)
  • Comments
  • Identifiers
    • Constants
    • Self
    • Local variables
    • Instance variables
    • Class Variables
    • Global Variables
    • Fresh Variables
  • Regex Literals
  • Operators
    • Infix and Unary
    • Logic
  • Range literals
  • Assignments
    • Variables
    • Constants
    • Multi-Assign
    • Underscore
  • Definitions
    • Methods
      • External names (parameters)
      • Bound generics (forall)
      • Block parameters (&)
    • Macros
    • Enums (including type restriction)
    • Structs (and extending)
    • Classes (and extending)
    • Modules
    • Annotations
    • Libs
      • Fun definitions
      • Unions
    • Aliases
  • Calls
  • Keywords
    • require
    • private (methods, macros, enums, structs, aliases, classes, modules, libs)
    • protected (methods)
    • abstract (methods, structs, classes)
    • include (structs, classes, modules)
    • extend (modules)
    • begin
    • do
    • rescue
    • ensure
    • return
    • break
    • next
    • end
    • typeof
    • sizeof
    • instance_sizeof
    • offsetof
    • (with) yield
    • super
    • previous_def
    • of
    • pointerof
    • uninitialized
    • verbatim (macros)
    • for (macros)
    • out
    • fun (libs)
    • union (libs)
    • Pseudo
      • is_a?
      • nil?
      • responds_to?
      • as
      • as?
    • Conditionals
      • if/unless
      • else/elsif
      • while/until
      • case - when/in (then)
  • Magic Constants
    • __LINE__
    • __END_LINE__
    • __FILE__
    • __DIR__

Setup CI

There should be CI setup to test PRs to ensure functionality (running tests) and for generating artifacts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.