-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Basic operator checking (fixes #92) - Inequality checks with ranges - Identity checks from disjoint with `NaN` - Disjoint with `Not` works (using subtyping) - Proper checking that allows string + number? - `infer T` in type annotation slice gets treated as `infer T extends string` (and also for generic arguments) - Add `Number.isNaN` checks - Change `GreaterThan` and `LessThan` to `InclusiveRange` and `ExclusiveRange` - Add operations to ranges with new `FloatRange` type - Changes `~`, `!` and `-` prefix operators to be in terms of `x ^ 0xFFFF_FFFF`, `x ? false : true` and `0 - x`. Removes `Constructor::UnaryOperation` - Fixes to narrowing for `if (a)` where a is `string | falsy etc` and also to optional chaining - Moves `a + b` is string or number to `result` field on `Constructor::BinaryOperator { result }` - Refactor of type helpers - Type parameter extends checking on arguments
- Loading branch information
1 parent
c952b6d
commit e69e2c5
Showing
49 changed files
with
2,448 additions
and
1,215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Examples | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
run-examples: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Build Ezno | ||
run: cargo build --release | ||
env: | ||
CARGO_PROFILE_RELEASE_DEBUG: true | ||
|
||
- name: Run checker on example files | ||
shell: bash | ||
run: | | ||
files=( | ||
"https://jsr.io/@yossydev/hello-world/1.0.0/index.ts" | ||
"https://jsr.io/@bengineering/shuffle-binary/0.0.1/index.ts" | ||
"https://jsr.io/@bengineering/mulberry32/0.0.1/mod.ts" | ||
"https://jsr.io/@luca/cases/1.0.0/mod.ts" | ||
"https://jsr.io/@std/assert/1.0.2/assertion_error.ts" | ||
"https://jsr.io/@std/text/1.0.3/levenshtein_distance.ts" | ||
"https://jsr.io/@gnome/monads/0.0.0/src/option.ts" | ||
"https://raw.githubusercontent.com/getify/deePool/master/src/deePool.js" | ||
"https://raw.githubusercontent.com/silen-z/fiveway/main/packages/fiveway/src/id.ts" | ||
) | ||
for url in "${files[@]}"; do | ||
header="--- $url ---" | ||
echo $header | ||
curl -s $url > temp.ts | ||
./target/release/ezno check temp.ts --timings | ||
echo "${header//?/-}" | ||
echo "" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.