Commit 3ceb9c0b authored by John van Groningen's avatar John van Groningen
Browse files

add boxed records and strict dot dot expressions

parent 7fee8aee
......@@ -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
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment