diff options
author | Alain Frisch <alain@frisch.fr> | 2012-07-18 12:29:54 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2012-07-18 12:29:54 +0000 |
commit | e9386ad8ed2f8053097f55743f87fdfc8d57792b (patch) | |
tree | 8eaeed0247c65adda15a5a441ddcd72bc1f4ffc6 /parsing/parser.mly | |
parent | 24514dc5b14d29c8f1ec736c5cfbd3194a35db59 (diff) | |
download | ocaml-autofocus.tar.gz |
New modifier in record declaration (after 'mutable'): 'match'. This enables autofocus for patterns which are not wildcard, variable, alias, constraint, or-pattern.autofocus
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/autofocus@12728 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'parsing/parser.mly')
-rw-r--r-- | parsing/parser.mly | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/parsing/parser.mly b/parsing/parser.mly index fb7d5745ae..0948ad6c7b 100644 --- a/parsing/parser.mly +++ b/parsing/parser.mly @@ -1446,8 +1446,13 @@ label_declarations: | label_declarations SEMI label_declaration { $3 :: $1 } ; label_declaration: - mutable_flag label COLON poly_type { (mkrhs $2 2, $1, $4, symbol_rloc()) } + mutable_flag focus_flag label COLON poly_type { (mkrhs $3 3, $1, $2, $5, symbol_rloc()) } ; +focus_flag: + | { NoFocus } + | MATCH { AutoFocus} +; + /* "with" constraints (additional type equations over signature components) */ |