From 8108b1c4fc26edbaa1acd9cace579b073d54d37a Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 25 Oct 2023 00:36:07 +0200 Subject: [PATCH] refactor doing nothing --- flap/src/hopix/hopixParser.mly | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flap/src/hopix/hopixParser.mly b/flap/src/hopix/hopixParser.mly index 2b66710..06b288f 100644 --- a/flap/src/hopix/hopixParser.mly +++ b/flap/src/hopix/hopixParser.mly @@ -171,10 +171,6 @@ simple_pattern: | l=pattern_list { 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 */ | l=located(literal) { PLiteral l @@ -183,6 +179,15 @@ simple_pattern: | const=located(constructor) tl=option(type_list) pl=optionlist(pattern_list) { PTaggedValue(const, tl, pl) } + +pattern: +| p1=simple_pattern { + p1 + } +/* Annotation de type */ +| p=located(simple_pattern) COLON ty=located(ty) { + PTypeAnnotation(p, ty) + } /* Enregistrement */ | LBRACE l=separated_nonempty_list( COMMA, @@ -190,11 +195,6 @@ simple_pattern: ) RBRACE tl=option(type_list) { PRecord(l, tl) } - -pattern: -| p1=simple_pattern { - p1 - } /* Disjonction */ | p1=located(simple_pattern) PIPE p_list=separated_nonempty_list(PIPE, located(simple_pattern)) {