From 241305caab232b04666704dc6853c41312cd283a Mon Sep 17 00:00:00 2001 From: Roy Frostig Date: Fri, 25 Jun 2010 00:47:23 -0700 Subject: Resolve and typecheck patterns in pattern alt redux. This time featuring way more correctness. --- src/boot/fe/ast.ml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/boot/fe/ast.ml') diff --git a/src/boot/fe/ast.ml b/src/boot/fe/ast.ml index 09037510..770b57bf 100644 --- a/src/boot/fe/ast.ml +++ b/src/boot/fe/ast.ml @@ -299,9 +299,14 @@ and domain = DOMAIN_local | DOMAIN_thread +(* + * PAT_tag uses lval for the tag constructor so that we can reuse our lval + * resolving machinery. The lval is restricted during parsing to have only + * named components. + *) and pat = PAT_lit of lit - | PAT_tag of ((name identified) * (pat array)) + | PAT_tag of (lval * (pat array)) | PAT_slot of ((slot identified) * ident) | PAT_wild @@ -331,6 +336,7 @@ and lval_component = | COMP_atom of atom +(* identifying the name_base here is sufficient to identify the full lval *) and lval = LVAL_base of name_base identified | LVAL_ext of (lval * lval_component) -- cgit v1.2.3