refactor doing nothing

This commit is contained in:
Mylloon 2023-10-25 00:36:07 +02:00
parent 358470f280
commit 8108b1c4fc
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -171,10 +171,6 @@ simple_pattern:
| l=pattern_list { | l=pattern_list {
match l with | [alone] -> Position.value alone | _ -> PTuple(l) match l with | [alone] -> Position.value alone | _ -> PTuple(l)
} }
/* Annotation de type */
| p=located(simple_pattern) COLON ty=located(ty) {
PTypeAnnotation(p, ty)
}
/* Entier / Caractère / String */ /* Entier / Caractère / String */
| l=located(literal) { | l=located(literal) {
PLiteral l PLiteral l
@ -183,6 +179,15 @@ simple_pattern:
| const=located(constructor) tl=option(type_list) pl=optionlist(pattern_list) { | const=located(constructor) tl=option(type_list) pl=optionlist(pattern_list) {
PTaggedValue(const, tl, pl) PTaggedValue(const, tl, pl)
} }
pattern:
| p1=simple_pattern {
p1
}
/* Annotation de type */
| p=located(simple_pattern) COLON ty=located(ty) {
PTypeAnnotation(p, ty)
}
/* Enregistrement */ /* Enregistrement */
| LBRACE l=separated_nonempty_list( | LBRACE l=separated_nonempty_list(
COMMA, COMMA,
@ -190,11 +195,6 @@ simple_pattern:
) RBRACE tl=option(type_list) { ) RBRACE tl=option(type_list) {
PRecord(l, tl) PRecord(l, tl)
} }
pattern:
| p1=simple_pattern {
p1
}
/* Disjonction */ /* Disjonction */
| p1=located(simple_pattern) | p1=located(simple_pattern)
PIPE p_list=separated_nonempty_list(PIPE, located(simple_pattern)) { PIPE p_list=separated_nonempty_list(PIPE, located(simple_pattern)) {