ocaml: phase 5.1 baseline OCaml programs (5/5 pass) + lookahead boundary
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 33s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 33s
lib/ocaml/baseline/{factorial,list_ops,option_match,module_use,sum_squares}.ml
exercised through ocaml-run-program (file-read F). lib/ocaml/baseline/
run.sh runs them and compares against expected.json — all 5 pass.
To make module_use.ml (with nested let-in) parse, parser's
skip-let-rhs-boundary! now uses has-matching-in? lookahead: a let at
depth 0 in a let-decl rhs opens a nested block IFF a matching in
exists before any decl-keyword. Without that in, the let is a new
top-level decl (preserves test 274 'let x = 1 let y = 2').
This is the first piece of Phase 5.1 'vendor a slice of OCaml
testsuite' — handcrafted fixtures for now, real testsuite TBD.
This commit is contained in:
7
lib/ocaml/baseline/expected.json
Normal file
7
lib/ocaml/baseline/expected.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"factorial.ml": 3628800,
|
||||
"list_ops.ml": 30,
|
||||
"option_match.ml": 5,
|
||||
"module_use.ml": 3,
|
||||
"sum_squares.ml": 385
|
||||
}
|
||||
Reference in New Issue
Block a user