Agda grammar for tree-sitter
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
corpus
src
todo
.gitattributes
.gitignore
.travis.yml
LICENSE
README.md
agda-lexer.x
agda-parser.y
appveyor.yml
binding.gyp
grammar.js
index.js
package.json

README.md

Agda Grammar for tree-sitter

Build Status

Syntax highlighting and code folding done right (with context-free grammar, finally!)

tree-sitter

Issues to be resolved

Telescoping let-bindings

f x = let y = x in
      let y = x in y

Things get a lot more complicated as the body of the binding (starts with 'in') could be elided following the introduction of do-notation.

main = do
    let x = y

Other factors including:

  • the bindings in between 'let' and 'in' could either be a single line or an indented block of top-level declarations
  • 'in' or the body after it could be at different lines

How to contribute

Install dependencies:

npm install

To see if you have tree-sitter installed:

npx tree-sitter

Run build to generate the parser:

npm run build

Run test to see if everything's okay:

npm test

You may wanna run this on the language-agda's side:

npm install
apm rebuild