diff options
| author | Jon French | 2018-04-23 16:04:37 +0100 |
|---|---|---|
| committer | Jon French | 2018-05-01 16:54:54 +0100 |
| commit | 14510c80fa9d105ab61f0ecfb96ea89f7edf6587 (patch) | |
| tree | eadaa120679f854bed4681a432058581aad7a129 /src/parser.mly | |
| parent | a9c5ebc1c1c0943f48c31831f95dd4d1d61b8dc3 (diff) | |
start of string pattern matching: currently only literals
Diffstat (limited to 'src/parser.mly')
| -rw-r--r-- | src/parser.mly | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parser.mly b/src/parser.mly index d126e253..cf2d50a7 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -177,7 +177,7 @@ let rec desugar_rchain chain s e = %token <string> String Bin Hex Real %token <string> Amp At Caret Eq Gt Lt Plus Star EqGt Unit -%token <string> Colon ColonColon TildeTilde ExclEq +%token <string> Colon ColonColon CaretCaret TildeTilde ExclEq %token <string> GtEq %token <string> LtEq @@ -651,6 +651,8 @@ pat1: { mk_pat (P_vector_concat ($1 :: $3)) $startpos $endpos } | atomic_pat ColonColon pat1 { mk_pat (P_cons ($1, $3)) $startpos $endpos } + | atomic_pat CaretCaret pat1 + { mk_pat (P_string_append ($1, $3)) $startpos $endpos } pat_concat: | atomic_pat |
