diff options
Diffstat (limited to 'readme.txt')
-rw-r--r-- | readme.txt | 56 |
1 files changed, 56 insertions, 0 deletions
@@ -144,5 +144,61 @@ but an explanation is included nonetheless: | |||
144 | the examples directory contains a complete markdown-to-html | 144 | the examples directory contains a complete markdown-to-html |
145 | converter, along with a few other motivating examples. | 145 | converter, along with a few other motivating examples. |
146 | 146 | ||
147 | --- | ||
148 | |||
149 | usage: | ||
150 | |||
151 | the tbsp evaluator is written in rust, use cargo to build | ||
152 | and run: | ||
153 | |||
154 | cargo build --release | ||
155 | ./target/release/tbsp --help | ||
156 | |||
157 | |||
158 | tbsp requires three inputs: | ||
159 | |||
160 | - a tbsp program, referred to as "program file" | ||
161 | - a language | ||
162 | - an input file or some input text at stdin | ||
163 | |||
164 | |||
165 | you can run the interpreter like so (this program prints an | ||
166 | overview of a rust file): | ||
167 | |||
168 | $ ./target/release/tbsp \ | ||
169 | -f./examples/code-overview/overview.tbsp \ | ||
170 | -l rust \ | ||
171 | src/main.rs | ||
172 | module | ||
173 | └╴struct Cli | ||
174 | └╴trait Cli | ||
175 | └╴fn program | ||
176 | └╴fn language | ||
177 | └╴fn file | ||
178 | └╴fn try_consume_stdin | ||
179 | └╴fn main | ||
180 | |||
181 | |||
182 | --- | ||
183 | |||
184 | roadmap: | ||
185 | |||
186 | - interpreter performance | ||
187 | - [ ] introduce a hir with arena allocated blocks, expr | ||
188 | - [ ] bytecode VM? | ||
189 | - [ ] look into embedding high perf VMs, lua etc. | ||
190 | - pattern matching | ||
191 | - [ ] allow matching on tree-sitter queries | ||
192 | - [ ] support captures | ||
193 | - language features | ||
194 | - [ ] arrays and loops | ||
195 | - [ ] access node children | ||
196 | - [x] access node fields | ||
197 | - [ ] repr for ranges | ||
198 | - [ ] comments | ||
199 | - [ ] regexes | ||
200 | |||
201 | |||
147 | [0]: https://github.com/tree-sitter-grammars/tree-sitter-markdown | 202 | [0]: https://github.com/tree-sitter-grammars/tree-sitter-markdown |
148 | [1]: https://git.peppe.rs/cli/tree-viz | 203 | [1]: https://git.peppe.rs/cli/tree-viz |
204 | |||