From 6543b615e0b6f03f6c84424e6d9caa2c1408052a Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Tue, 22 May 2018 20:56:47 -0700 Subject: [PATCH] better / more tests --- formatTest/unit_tests/expected_output/infix.re | 2 ++ formatTest/unit_tests/input/infix.re | 2 ++ src/reason-parser/reason_lexer.mll | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/formatTest/unit_tests/expected_output/infix.re b/formatTest/unit_tests/expected_output/infix.re index a1dbd2b52..ea3e7d20c 100644 --- a/formatTest/unit_tests/expected_output/infix.re +++ b/formatTest/unit_tests/expected_output/infix.re @@ -1202,3 +1202,5 @@ let x = a >< b; let (=\>) = (a, b) => a + b; let x = a =\> b; + +let (=>>) = (a, b) => a + b; diff --git a/formatTest/unit_tests/input/infix.re b/formatTest/unit_tests/input/infix.re index 176db6e80..75e387741 100644 --- a/formatTest/unit_tests/input/infix.re +++ b/formatTest/unit_tests/input/infix.re @@ -919,3 +919,5 @@ let x = a >< b; let (=\>) = (a, b) => a + b; let x = a =\> b; + +let (=>>) = (a, b) => a + b; diff --git a/src/reason-parser/reason_lexer.mll b/src/reason-parser/reason_lexer.mll index d84649c22..98bafd221 100644 --- a/src/reason-parser/reason_lexer.mll +++ b/src/reason-parser/reason_lexer.mll @@ -611,7 +611,7 @@ rule token = parse { INFIXOP0(lexeme_operator lexbuf) } (* `=\>` is treated especially due to conflicts with the function declaration syntax *) - | '\\'? '=' '\\'? '>' operator_chars* + | '\\'? "=\\>" { INFIXOP0(lexeme_operator lexbuf) } | '\\'? '@' operator_chars* { INFIXOP1(lexeme_operator lexbuf) }