Skip to content

Fix exponential notation syntax #7105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
b0d59c0
Fix gentype jsx issue
cristianoc Oct 19, 2024
40e15c8
Update CHANGELOG.md
cristianoc Oct 19, 2024
b3ed5c8
Minor gentype fixes (#7109)
cknitt Oct 19, 2024
d924f63
Capitalize runtime filenames (#7110)
cknitt Oct 20, 2024
a3dee73
Move Core into compiler repo (#7108)
cknitt Oct 20, 2024
6d9df0f
Fix undefined being emitted instead of null (#7112)
cknitt Oct 20, 2024
47870d0
Handle absolute paths in typegen (#7104)
Bushuo Oct 21, 2024
1247e83
Fix some primitives usage (#7114)
cknitt Oct 21, 2024
411b7b5
Build mocha tests as esmodule / .mjs (#7115)
cknitt Oct 21, 2024
4c28fa1
Add Core tests (#7116)
cknitt Oct 22, 2024
66daccb
Check for diffs in tests folder after running tests (#7119)
cknitt Oct 22, 2024
75eae8b
Only save benchmark data from master builds as new baseline
cknitt Oct 23, 2024
cd5e018
Benchmark: report on alert only (> 5% difference)
cknitt Oct 23, 2024
eec9b2a
Prepare for 12.0.0-alpha.4 release (#7122)
cknitt Oct 23, 2024
3f031d4
Set version to 12.0.0-alpha.5 (#7123)
cknitt Oct 23, 2024
1313bb8
Prettify predef registration (#7124)
cometkim Oct 23, 2024
a8329d5
Heuristic for pattern matching untagged variants.
cristianoc Oct 25, 2024
54815a3
Heuristic: size of generated code.
cristianoc Oct 25, 2024
f5d5606
Update CHANGELOG.md
cristianoc Oct 25, 2024
5b73fb3
Bring ad-hoc simplification of && generation up to speed.
cristianoc Oct 26, 2024
60b99ea
respect declaration order
cristianoc Oct 26, 2024
54c5459
Remove unused stuff from Bsb_exception (#7130)
cknitt Oct 26, 2024
3b93359
Get rid of \"@@" in tests (#7131)
cknitt Oct 26, 2024
381cfdf
Better logic to simplify and/or.
cristianoc Oct 30, 2024
7b9b0c5
Begin adding tests.
cristianoc Oct 30, 2024
2386f6e
Handle undefined too.
cristianoc Oct 30, 2024
eca611d
rewrite more directly
cristianoc Oct 30, 2024
54fc0b5
extend example
cristianoc Oct 30, 2024
795becf
Doc comments and changelog.
cristianoc Oct 31, 2024
4a1aaee
Better logic to simplify negation.
cristianoc Oct 31, 2024
32ccf6b
Fix Array.isArray.
cristianoc Oct 31, 2024
b0432b7
number
cristianoc Oct 31, 2024
8aedd75
Handle combination of typeof and != const
cristianoc Oct 31, 2024
a4da90c
case isArray
cristianoc Oct 31, 2024
8d7b2b6
More interesting example.
cristianoc Oct 31, 2024
9a298c4
Update CHANGELOG.md
cristianoc Oct 31, 2024
a3a81bc
Update Core_NullableTests.mjs
cristianoc Oct 31, 2024
56704f3
Fix stale tests.
cristianoc Oct 31, 2024
7d10374
Fix logic.
cristianoc Oct 31, 2024
41e2fd6
Simplfy e?true:false to e
cristianoc Oct 31, 2024
4dcd84b
Use dict instead of Dict.t everywhere (#7136)
cknitt Oct 31, 2024
f28cbd6
small simplification: null or undefined
cristianoc Oct 31, 2024
007874b
Simplifications for string and number constants.
cristianoc Oct 31, 2024
43d2bbf
Update CHANGELOG.md
cristianoc Oct 31, 2024
2c2c530
Code gen: improve pattern matching of optional fields.
cristianoc Nov 1, 2024
e1eaad3
Update CHANGELOG.md
cristianoc Nov 1, 2024
787a764
Optional fields pattern matching: untagged variants
cristianoc Nov 2, 2024
bcaccfc
refactor: more logic in ast_untagged_variants
cristianoc Nov 2, 2024
8d6d8b7
Extend test with 0-ary case.
cristianoc Nov 2, 2024
f6968ec
Support nullary variants.
cristianoc Nov 2, 2024
3d15ce4
Add test to check correctness of undefined case.
cristianoc Nov 2, 2024
1a3efbe
Update CHANGELOG.md
cristianoc Nov 2, 2024
d7aaa37
Experiment for untagged pattern matching.
cristianoc Oct 30, 2024
0ccd292
Fuse const and block cases when the defaults are equal.
cristianoc Nov 3, 2024
35a6543
clean up code
cristianoc Nov 4, 2024
48f30e5
Update CHANGELOG.md
cristianoc Nov 4, 2024
b0211f3
Unified operators (#7057)
cometkim Nov 6, 2024
25680ed
More boolean simplifications in generated code.
cristianoc Nov 7, 2024
80da451
typeof bool && x
cristianoc Nov 7, 2024
c64ef0b
cleanup
cristianoc Nov 7, 2024
9272b25
Fix and_, strengthen or_
cristianoc Nov 7, 2024
4b70394
x === v1 && x !== v2
cristianoc Nov 7, 2024
7a58f3b
Update CHANGELOG.md
cristianoc Nov 8, 2024
971f935
Add remainder (`%` aka modulus) operator (#7152)
cometkim Nov 9, 2024
912b428
Simplify conditionals.
cristianoc Nov 8, 2024
bfa8d94
Update CHANGELOG.md
cristianoc Nov 8, 2024
3936545
Squeeze in side effects check
cristianoc Nov 8, 2024
f668c4f
comment
cristianoc Nov 8, 2024
51d1abe
Only apply optimisations when there are no side effects.
cristianoc Nov 9, 2024
fbb2774
More side effects.
cristianoc Nov 10, 2024
2e84c84
More side effect cases.
cristianoc Nov 10, 2024
fe49581
dead code
cristianoc Nov 10, 2024
b48740c
Add example of what was previously over-optimized.
cristianoc Nov 10, 2024
682c8a0
Update CHANGELOG.md
cristianoc Nov 10, 2024
4a748bb
Move rescript-editor-analysis and rescript-tools into compiler repo (…
cknitt Nov 12, 2024
f969c05
remove now irrelevant jsx v3 stuff from editor tooling (#7158)
zth Nov 12, 2024
ee8092a
setup-ocaml 3.0.15 (#7164)
cknitt Nov 19, 2024
92477bd
Fix `arguments` and `eval` mangling (#7163)
cometkim Nov 20, 2024
9127794
doc: archive old changelog [skip ci] (#7165)
cometkim Nov 20, 2024
a935b5d
Rescript tool tweaks (#7160)
nojaf Nov 20, 2024
8fbe2b0
Prepare for 12.0.0-alpha.5 release (#7166)
cknitt Nov 21, 2024
5ec125a
Set version to 12.0.0-alpha.6 (#7167)
cknitt Nov 21, 2024
e8b64c5
Check for digits after exponent char
shulhi Oct 17, 2024
b98d037
Add tests
shulhi Oct 17, 2024
51153e7
Update CHANGELOG
shulhi Nov 24, 2024
b674b00
Better variable name
shulhi Nov 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 23 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ jobs:

env:
# setup-ocaml opam version cannot be configured
# we do track its version mannually
OPAM_VERSION: 2.2.0
# we do track its version manually
OPAM_VERSION: 2.3.0
DUNE_PROFILE: release

steps:
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
# matrix.ocaml_compiler may contain commas
- name: Get OPAM cache key
shell: bash
run: echo "opam_cache_key=opam-env-v4-${{ matrix.os }}-${{ matrix.ocaml_compiler }}-${{ hashFiles('dune-project') }}" | sed 's/,/-/g' >> $GITHUB_ENV
run: echo "opam_cache_key=opam-env-v5-${{ matrix.os }}-${{ matrix.ocaml_compiler }}-${{ hashFiles('dune-project') }}" | sed 's/,/-/g' >> $GITHUB_ENV

- name: Restore OPAM environment
id: cache-opam-env
Expand All @@ -167,7 +167,7 @@ jobs:
key: ${{ env.opam_cache_key }}

- name: Use OCaml ${{matrix.ocaml_compiler}}
uses: ocaml/[email protected].7
uses: ocaml/[email protected].15
if: steps.cache-opam-env.outputs.cache-hit != 'true'
with:
ocaml-compiler: ${{matrix.ocaml_compiler}}
Expand Down Expand Up @@ -317,6 +317,13 @@ jobs:
- name: Run tests
run: node scripts/test.js -all

- name: Check for diffs in tests folder
run: git diff --ignore-cr-at-eol --exit-code tests

- name: Run analysis / tools tests
if: runner.os != 'Windows' && matrix.os != 'buildjet-2vcpu-ubuntu-2204-arm'
run: opam exec -- make -C tests/analysis_tests test && make -C tests/tools_tests test

- name: Run gentype tests
if: runner.os != 'Windows'
run: make -C tests/gentype_tests/typescript-react-example clean test
Expand All @@ -325,14 +332,14 @@ jobs:
if: matrix.benchmarks
run: ./_build/install/default/bin/syntax_benchmarks | tee tests/benchmark-output.json

- name: Download previous benchmark data
- name: Restore previous benchmark data
if: matrix.benchmarks
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: ./tests/benchmark-cache
key: syntax-benchmark-v1

- name: Store benchmark result
- name: Create new benchmark data and comment on alert
# Do not run for PRs created from other repos as those won't be able to write to the pull request
if: ${{ matrix.benchmarks && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.event.repository.full_name) }}
uses: benchmark-action/github-action-benchmark@v1
Expand All @@ -342,10 +349,17 @@ jobs:
output-file-path: tests/benchmark-output.json
external-data-json-path: ./tests/benchmark-cache/benchmark-data.json
github-token: ${{ secrets.GITHUB_TOKEN }}
alert-threshold: "120%"
comment-always: true
alert-threshold: "105%"
comment-always: false
comment-on-alert: true

- name: Save benchmark data as new baseline
if: matrix.benchmarks && github.ref == 'refs/heads/master'
uses: actions/cache/save@v4
with:
path: ./tests/benchmark-cache
key: syntax-benchmark-v1

- name: Build playground compiler
if: matrix.build_playground
run: |
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,8 @@ playground/compiler.js

rewatch/target/
rewatch/rewatch

tests/tools_tests/**/*.res.js
tests/tools_tests/lib
tests/analysis_tests*/lib
tests/analysis_tests/**/*.bs.js
Loading
Loading