diff options
author | johnvg | 2002-10-18 14:18:13 +0000 |
---|---|---|
committer | johnvg | 2002-10-18 14:18:13 +0000 |
commit | 81ca3daec5e15a8453861b34a7a64ad1690fae7c (patch) | |
tree | 223ff43b2334982260b67ecaaa2725456abcdfc1 | |
parent | disable arity check to circumvent bug in compiling the module relayout.icl in... (diff) |
add boxed records and strict dot dot expressions
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1236 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r-- | frontend/syntax.dcl | 11 | ||||
-rw-r--r-- | frontend/syntax.icl | 10 |
2 files changed, 11 insertions, 10 deletions
diff --git a/frontend/syntax.dcl b/frontend/syntax.dcl index 11b070c..af12d3d 100644 --- a/frontend/syntax.dcl +++ b/frontend/syntax.dcl @@ -104,7 +104,7 @@ instance == FunctionOrMacroIndex :: ModuleKind = MK_Main | MK_Module | MK_System | MK_None | MK_NoMainDcl :: RhsDefsOfType = ConsList ![ParsedConstructor] - | SelectorList !Ident ![ATypeVar] ![ParsedSelector] + | SelectorList !Ident ![ATypeVar] !Bool /*is_boxed_record*/ ![ParsedSelector] | TypeSpec !AType | EmptyRhs !BITVECT | AbstractTypeSpec !BITVECT !AType @@ -402,6 +402,7 @@ cIsImportedObject :== False :: RecordType = { rt_constructor :: !DefinedSymbol , rt_fields :: !{# FieldSymbol} + , rt_is_boxed_record :: !Bool } :: FieldSymbol = @@ -1163,10 +1164,10 @@ instance toString KindInfo , qual_filename :: !FileName } -:: Sequence = SQ_FromThen ParsedExpr ParsedExpr - | SQ_FromThenTo ParsedExpr ParsedExpr ParsedExpr - | SQ_From ParsedExpr - | SQ_FromTo ParsedExpr ParsedExpr +:: Sequence = SQ_FromThen !Int ParsedExpr ParsedExpr + | SQ_FromThenTo !Int ParsedExpr ParsedExpr ParsedExpr + | SQ_From !Int ParsedExpr + | SQ_FromTo !Int ParsedExpr ParsedExpr :: BoundExpr :== Bind ParsedExpr Ident diff --git a/frontend/syntax.icl b/frontend/syntax.icl index e9f91b0..5faa466 100644 --- a/frontend/syntax.icl +++ b/frontend/syntax.icl @@ -339,10 +339,10 @@ where instance <<< Sequence where - (<<<) file (SQ_From expr) = file <<< expr - (<<<) file (SQ_FromTo from_expr to_expr) = file <<< from_expr <<< ".." <<< to_expr - (<<<) file (SQ_FromThen from_expr then_expr) = file <<< from_expr <<< ',' <<< then_expr <<< ".." - (<<<) file (SQ_FromThenTo from_expr then_expr to_expr) = file <<< from_expr <<< ',' <<< then_expr <<< ".." <<< to_expr + (<<<) file (SQ_From _ expr) = file <<< expr + (<<<) file (SQ_FromTo _ from_expr to_expr) = file <<< from_expr <<< ".." <<< to_expr + (<<<) file (SQ_FromThen _ from_expr then_expr) = file <<< from_expr <<< ',' <<< then_expr <<< ".." + (<<<) file (SQ_FromThenTo _ from_expr then_expr to_expr) = file <<< from_expr <<< ',' <<< then_expr <<< ".." <<< to_expr instance <<< Expression where @@ -714,7 +714,7 @@ where instance <<< RhsDefsOfType where (<<<) file (ConsList cons_defs) = file <<< cons_defs - (<<<) file (SelectorList _ _ sel_defs) = file <<< sel_defs + (<<<) file (SelectorList _ _ _ sel_defs) = file <<< sel_defs (<<<) file (TypeSpec type) = file <<< type (<<<) file _ = file |