Skip to content

Commit

Permalink
[parser] Add |> token
Browse files Browse the repository at this point in the history
  • Loading branch information
goodmind committed Jul 6, 2019
1 parent 0d0fa71 commit b41710e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/parser/flow_lexer.ml
Expand Up @@ -880,6 +880,7 @@ let token (env: Lex_env.t) lexbuf : result =
| "?" -> Token (env, T_PLING)
| "&&" -> Token (env, T_AND)
| "||" -> Token (env, T_OR)
| "|>" -> Token (env, T_PIPELINE)
| "===" -> Token (env, T_STRICT_EQUAL)
| "!==" -> Token (env, T_STRICT_NOT_EQUAL)
| "<=" -> Token (env, T_LESS_THAN_EQUAL)
Expand Down
3 changes: 3 additions & 0 deletions src/parser/token.ml
Expand Up @@ -100,6 +100,7 @@ type t =
| T_PLING
| T_COLON
| T_OR
| T_PIPELINE
| T_AND
| T_BIT_OR
| T_BIT_XOR
Expand Down Expand Up @@ -269,6 +270,7 @@ let token_to_string = function
| T_COLON -> "T_COLON"
| T_OR -> "T_OR"
| T_AND -> "T_AND"
| T_PIPELINE -> "T_PIPELINE"
| T_BIT_OR -> "T_BIT_OR"
| T_BIT_XOR -> "T_BIT_XOR"
| T_BIT_AND -> "T_BIT_AND"
Expand Down Expand Up @@ -403,6 +405,7 @@ let value_of_token = function
| T_COLON -> ":"
| T_OR -> "||"
| T_AND -> "&&"
| T_PIPELINE -> "|>"
| T_BIT_OR -> "|"
| T_BIT_XOR -> "^"
| T_BIT_AND -> "&"
Expand Down

0 comments on commit b41710e

Please sign in to comment.