-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/flake.lock -diff | ||
|
||
/bindings/** linguist-generated=true | ||
/src/** linguist-generated=true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/result | ||
/.direnv | ||
|
||
/build/ | ||
/Cargo.lock | ||
/node_modules/ | ||
/package-lock.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[language]] | ||
name = "text" | ||
scope = "source.text" | ||
injection-regex = "text" | ||
file-types = ["txt"] | ||
roots = [] | ||
indent = { tab-width = 1, unit = " " } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[package] | ||
name = "tree-sitter-koka" | ||
description = "Koka grammar for the tree-sitter parsing library" | ||
version = "0.0.1" | ||
keywords = ["incremental", "parsing", "koka"] | ||
categories = ["parsing", "text-editors"] | ||
repository = "https://github.com/mtoohey31/tree-sitter-koka" | ||
edition = "2018" | ||
license = "MIT" | ||
|
||
build = "bindings/rust/build.rs" | ||
include = [ | ||
"bindings/rust/*", | ||
"grammar.js", | ||
"queries/*", | ||
"src/*", | ||
] | ||
|
||
[lib] | ||
path = "bindings/rust/lib.rs" | ||
|
||
[dependencies] | ||
tree-sitter = "~0.20.3" | ||
|
||
[build-dependencies] | ||
cc = "1.0" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"targets": [ | ||
{ | ||
"target_name": "tree_sitter_koka_binding", | ||
"include_dirs": [ | ||
"<!(node -e \"require('nan')\")", | ||
"src" | ||
], | ||
"sources": [ | ||
"bindings/node/binding.cc", | ||
"src/parser.c", | ||
# If your language uses an external scanner, add it here. | ||
], | ||
"cflags_c": [ | ||
"-std=c99", | ||
] | ||
} | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
description = "tree-sitter-koka"; | ||
|
||
inputs = { | ||
nixpkgs.url = "nixpkgs/nixpkgs-unstable"; | ||
utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, utils }: { | ||
overlays.default = _: prev: { | ||
tree-sitter = prev.tree-sitter.override { | ||
extraGrammars.tree-sitter-koka = { | ||
language = "koka"; | ||
inherit (prev.tree-sitter) version; | ||
src = _: builtins.path { path = ./.; name = "tree-sitter-koka-src"; }; | ||
}; | ||
}; | ||
}; | ||
} // utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { | ||
overlays = [ self.overlays.default ]; | ||
inherit system; | ||
}; | ||
inherit (pkgs) mkShell nodejs nodePackages python3 tree-sitter typescript; | ||
in | ||
{ | ||
packages.default = tree-sitter.builtGrammars.tree-sitter-koka; | ||
|
||
devShells.default = mkShell { | ||
packages = [ | ||
nodejs | ||
nodePackages.typescript-language-server | ||
python3 | ||
tree-sitter | ||
typescript | ||
]; | ||
}; | ||
}); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/// <reference types="tree-sitter-cli/dsl" /> | ||
// @ts-check | ||
|
||
module.exports = grammar({ | ||
name: 'koka', | ||
rules: { | ||
source_file: $ => seq(), | ||
} | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "tree-sitter-koka", | ||
"version": "0.1.0", | ||
"description": "Koka grammar for tree-sitter", | ||
"author": "Matthew Toohey <[email protected]>", | ||
"dependencies": { | ||
"nan": "^2.17.0" | ||
}, | ||
"devDependencies": { | ||
"tree-sitter-cli": "^0.20.7" | ||
}, | ||
"main": "bindings/node", | ||
"tree-sitter": [ | ||
{ | ||
"scope": "source.koka", | ||
"injection-regex": "koka", | ||
"file-types": ["kk"] | ||
} | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.