File tree Expand file tree Collapse file tree 3 files changed +28
-7
lines changed Expand file tree Collapse file tree 3 files changed +28
-7
lines changed Original file line number Diff line number Diff line change
1
+ # PYTHON ONLY
2
+ FROM rust
3
+
4
+ RUN cargo install tree-sitter-cli
5
+
6
+ # Setup parser
7
+ COPY config.json /root/.config/tree-sitter/config.json
8
+
9
+ RUN <<EOF
10
+ mkdir -p /root/parsers
11
+ cd /root/parsers
12
+ git clone https://github.com/tree-sitter/tree-sitter-python
13
+ EOF
14
+
15
+ ENTRYPOINT [ "/bin/bash" , "-c" ]
Original file line number Diff line number Diff line change
1
+ {
2
+ "parser-directories" : [
3
+ " /root/parsers"
4
+ ]
5
+ }
Original file line number Diff line number Diff line change 1
1
---
2
2
tools :
3
- - name : run-javascript-sandbox
4
- description : execute javascript code
3
+ - name : run-tree-sitter
4
+ description : Runs tree sitter in the current directory.
5
5
parameters :
6
6
type : object
7
7
properties :
8
- javascript :
8
+ tree_sitter_args :
9
9
type : string
10
- description : the javascript code to run
10
+ description : The args to pass to tree-sitter-cli
11
11
container :
12
- image : vonwig/javascript-runner
12
+ image : vonwig/tree_sitter
13
13
command :
14
- - " {{javascript |safe}}"
14
+ - " tree-sitter {{tree_sitter_args |safe}}"
15
15
---
16
16
17
17
# prompt user
18
- Use tree-sitter
18
+
19
+ Use tree-sitter with args ` parse '**/*.py' > /thread/ast.txt `
19
20
You can’t perform that action at this time.
0 commit comments