diff options
author | johnvg | 2001-07-13 10:31:14 +0000 |
---|---|---|
committer | johnvg | 2001-07-13 10:31:14 +0000 |
commit | 41abcc4ecfe0accfe2d7fa97101c6ada98fb142b (patch) | |
tree | bbd1f1177bbd07e964d1613ec5547f1c5351b924 | |
parent | uniqueness attributes in backend (diff) |
{} 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
-rw-r--r-- | frontend/parse.icl | 7 |
1 files 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 _ |