Nick Fitzgerald
a099b2b590
Extend fuzzing to semantic analysis and codegen
...
* Fix a panic when we are substituting macro args, but we already had an error
involving the macro.
* Fix a stack overflow when an internal extractor's definition is recursive.
2021-11-11 15:56:55 -08:00
Nick Fitzgerald
9be1942b11
Use .copied() instead of .cloned()
2021-11-11 15:56:55 -08:00
Nick Fitzgerald
6604a26e27
Add a top-level parse function
...
And make `parse_defs` take `self` by ownership. This avoids a couple `Vec`
clones.
2021-11-11 15:56:55 -08:00
Nick Fitzgerald
e3aeb850b2
Fix a panic when parsing var patterns
2021-11-11 15:56:55 -08:00
Nick Fitzgerald
f2b6244b9c
Fix some panics on parsing error paths
2021-11-11 15:56:55 -08:00
Nick Fitzgerald
6a523938de
Fix overflows when tokenizing integer literals
2021-11-11 15:56:55 -08:00
Nick Fitzgerald
cfaa35d8c0
Use structopt to derive CLI flags
...
Instead of using `clap` directly
2021-11-11 15:56:55 -08:00
Nick Fitzgerald
6ffb02d9f6
Use miette for reporting errors
...
This gives us errors with annotated context like this:
```
Error:
× type error: Unknown variable 'x'
╭─[isle_examples/let.isle:24:1]
24 │ (Lower (B.B z))
25 │ (A.Add x y))
· ┬
· ╰── Unknown variable 'x'
╰────
```
2021-11-11 15:56:55 -08:00
Nick Fitzgerald
38da2cee3e
Switch to using thiserror
2021-11-11 15:56:55 -08:00
Nick Fitzgerald
b93304b327
Add docs to all public exports and deny(missing_docs) going forward
2021-11-11 15:56:55 -08:00
Nick Fitzgerald
922a3886d5
Fix let variable typing rules
2021-11-11 15:56:55 -08:00
Nick Fitzgerald
972dc00a92
Don't use &mut dyn Write in codegen
...
We always use a `String` which has infallible writing so we can remove all these
`Result`s and pretend-fallible methods.
2021-11-11 15:56:55 -08:00
Nick Fitzgerald
3535f82056
Remove an unused field in TermFunctionBuilder
2021-11-11 15:56:55 -08:00
Nick Fitzgerald
5f5484ddbc
Use matches!(..) to make TrieNode::is_empty more concise
2021-11-11 15:56:55 -08:00
Chris Fallin
20bc5ca7a8
Support extern constants of any primitive type.
2021-11-11 15:56:55 -08:00
Chris Fallin
521010cc4f
Split into isle and islec crates
2021-11-11 15:56:55 -08:00