Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
7h3kk1d committed Dec 22, 2024
1 parent 7472c64 commit 24ebb17
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions src/haz3lmenhir/AST.re
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ let arb_constructor_ident =
);
QCheck.map(
ident =>
// if ident is a keyword add a suffix
// if ident is a keyword remap
switch (ident) {
| "Int"
| "Float"
Expand All @@ -205,24 +205,9 @@ let arb_constructor_ident =
let arb_ident =
QCheck.(
// TODO make this support full indent instead of just lower alpha
QCheck.map(
ident =>
// if ident is a keyword add a suffix
switch (ident) {
| "let"
| "if"
| "pause"
| "debug"
| "hide"
| "eval"
| "rec"
| "in" => "keyword"
| _ => ident
},
string_gen_of_size(
Gen.int_range(1, 1),
QCheck.Gen.char_range('a', 'z'),
),
string_gen_of_size(
Gen.int_range(1, 1),
QCheck.Gen.char_range('a', 'z'),
)
);

Expand Down Expand Up @@ -260,7 +245,7 @@ let gen_tpat: QCheck.Gen.t(tpat) =
QCheck.Gen.(
let gen_var = map(x => VarTPat(x), arb_ident.gen);
let gen_empty = pure(EmptyHoleTPat);
// let gen_invalid = map(x => InvalidTPat(x), arb_ident.gen);
// let gen_invalid = map(x => InvalidTPat(x), arb_ident.gen); // Menhir parser doesn't actually support invalid tpat
oneof([gen_var, gen_empty])
);

Expand Down

0 comments on commit 24ebb17

Please sign in to comment.