Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit ab9cdc0

Browse files
committed
semantic-ast: Re-add executable to Cabal
It is still documented in the README and much more convenient than Bazel.
1 parent d59d4cf commit ab9cdc0

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

Diff for: semantic-ast/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ This package is concerned with the CodeGen generation of strongly-typed ASTs.
55
The provided `semantic-ast` executable is responsible for generating ASTs from language definitions. You can run it like so:
66

77
```
8-
cabal run semantic-ast -- --language=JSON
8+
RUNFILES_DIR=path/to/haskell-tree-sitter cabal run semantic-ast -- --rootdir=. --language=JSON
99
```
1010

1111
You can also pass `all` to regenerate every language definition:
1212

1313
```
14-
cabal run semantic-ast -- --language=all
14+
RUNFILES_DIR=path/to/haskell-tree-sitter cabal run semantic-ast -- --rootdir=. --language=all
1515
```
1616

1717
[Documentation](https://github.com/github/semantic/blob/master/docs/codegen.md)

Diff for: semantic-ast/semantic-ast.cabal

+31
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,34 @@ library
8080
, unordered-containers ^>= 0.2.10
8181

8282
hs-source-dirs: src
83+
84+
executable generate-ast
85+
import: haskell
86+
hs-source-dirs: app
87+
main-is: Main.hs
88+
build-depends:
89+
semantic-ast,
90+
base,
91+
filepath,
92+
process,
93+
template-haskell,
94+
text,
95+
semantic-source,
96+
bazel-runfiles,
97+
directory,
98+
generic-lens,
99+
lens,
100+
neat-interpolation,
101+
optparse-generic,
102+
tree-sitter,
103+
tree-sitter-c,
104+
tree-sitter-go,
105+
tree-sitter-java,
106+
tree-sitter-json,
107+
tree-sitter-php,
108+
tree-sitter-python,
109+
tree-sitter-ql,
110+
tree-sitter-ruby,
111+
tree-sitter-rust,
112+
tree-sitter-tsx,
113+
tree-sitter-typescript

0 commit comments

Comments
 (0)