From 41abcc4ecfe0accfe2d7fa97101c6ada98fb142b Mon Sep 17 00:00:00 2001 From: johnvg Date: Fri, 13 Jul 2001 10:31:14 +0000 Subject: {} is not allowed in patterns, because array 'denotations' in patterns are not implemented git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@543 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/parse.icl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/parse.icl b/frontend/parse.icl index 26e3cc8..ae5f528 100644 --- a/frontend/parse.icl +++ b/frontend/parse.icl @@ -2391,16 +2391,17 @@ buildNodeDef lhsExpr rhsExpr wantRecordOrArrayExp :: !Bool !ParseState -> (ParsedExpr, !ParseState) wantRecordOrArrayExp is_pattern pState # (token, pState) = nextToken FunctionContext pState - | token == CurlyCloseToken - = (PE_ArrayDenot [], pState) | is_pattern | token == SquareOpenToken # (elems, pState) = want_array_assignments cIsAPattern pState = (PE_ArrayPattern elems, wantToken FunctionContext "array selections in pattern" CurlyCloseToken pState) -// MW was = (PE_Empty, parseError "array selection" No "No array selection in pattern" pState) + | token == CurlyCloseToken + = (PE_Empty, parseError "record or array pattern" No "Array denotation not" pState) // otherwise // is_pattern && token <> SquareOpenToken = want_record_pattern token pState // otherwise // ~ is_pattern + | token == CurlyCloseToken + = (PE_ArrayDenot [], pState) # (opt_type, pState) = try_type_specification token pState = case opt_type of Yes _ -- cgit v1.2.3