Skip to content

Commit

Permalink
Parser and CLI updates (#145)
Browse files Browse the repository at this point in the history
* Parser and CLI updates
- Add asserts type (technically function return type)
- Add `as` for inteface rule + more
- Add binary *self-upgrade* system
- Start on #81 with allowing multiple entry points
- Rename some examples
- Add 'pretty-printing' example
- Update fuzzing lock file (should fix them)
- Improvements to the info command and upgrade command output
- Clippy fixes
- Still a fuzzing issue but we will move
  • Loading branch information
kaleidawave authored May 24, 2024
1 parent 47a423a commit c4ada6d
Show file tree
Hide file tree
Showing 48 changed files with 1,711 additions and 834 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/performance-and-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
\`\`\`ts
// $LINES_OF_CODE lines of TypeScript generated from specification.md
// this is not meant to accurately represent a program but instead give an idea for how it scales across all the type checking features
$(cat ./demo.ts)
\`\`\`
</details>
Expand Down Expand Up @@ -97,12 +98,12 @@ jobs:
"https://esm.sh/v135/[email protected]/es2022/typescript.mjs"
)
// TODO hyperfine
for url in "${strings[@]}"; do
curl -sS $url > input.js
echo "--- debug: $url ---"
cargo run -p ezno-parser --example parse input.js --timings --render-timings
echo "--- release: $url ---"
cargo run -p ezno-parser --release --example parse input.js --timings --render-timings
hyperfine "./target/debug/examples/parse input.js" "./target/release/examples/parse input.js"
done
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ target
/private
.vscode
.env
**/examples/private-*.rs
**/examples/private*.rs
build
node_modules
/TODO.txt
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Now in the `ezno` directory, `cargo run` should show the CLI.
You can run just the checker with

```shell
cargo run -p ezno-checker --example run path/to/file.ts
cargo run -p ezno-checker --example run-checker path/to/file.ts
```

> [!TIP]
Expand All @@ -48,7 +48,7 @@ cargo test -p ezno-checker-specification -F all
If you want to regenerate the binary definition file

```shell
cargo run -p ezno-checker -F ezno-parser --example cache ./checker/definitions/overrides.d.ts ./checker/definitions/internal.ts.d.bin
cargo run -p ezno-checker -F ezno-parser --example generate-cache ./checker/definitions/overrides.d.ts ./checker/definitions/internal.ts.d.bin
```

If you want to test the lexing and parsing in Ezno's parser
Expand Down
Loading

0 comments on commit c4ada6d

Please sign in to comment.