aboutsummaryrefslogtreecommitdiff
path: root/frontend/syntax.dcl
diff options
context:
space:
mode:
authorjohnvg2007-04-12 11:56:19 +0000
committerjohnvg2007-04-12 11:56:19 +0000
commitbdf7cd91b17bd073b04e9820957db71fbd6347fb (patch)
tree99d003de7ed3710e0d5852c57e395e9d7feddd78 /frontend/syntax.dcl
parentremove unused type Choice (diff)
implement {# and {! in array comprehensions that create a new array
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1671 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/syntax.dcl')
-rw-r--r--frontend/syntax.dcl13
1 files changed, 10 insertions, 3 deletions
diff --git a/frontend/syntax.dcl b/frontend/syntax.dcl
index 3cbafa0..12131b1 100644
--- a/frontend/syntax.dcl
+++ b/frontend/syntax.dcl
@@ -1179,14 +1179,14 @@ instance toString KindInfo
| PE_Record !ParsedExpr !OptionalRecordName ![FieldAssignment]
| PE_ArrayPattern ![ElemAssignment]
| PE_UpdateComprehension !ParsedExpr !ParsedExpr !ParsedExpr ![Qualifier]
- | PE_ArrayDenot ![ParsedExpr]
+ | PE_ArrayDenot !ArrayKind ![ParsedExpr]
| PE_Selection !ParsedSelectorKind !ParsedExpr ![ParsedSelection]
| PE_Update !ParsedExpr [ParsedSelection] ParsedExpr
| PE_Case !Ident !ParsedExpr [CaseAlt]
| PE_If !Ident !ParsedExpr !ParsedExpr !ParsedExpr
| PE_Let !Bool !LocalDefs !ParsedExpr
| PE_ListCompr /*predef_cons_index:*/ !Int /*predef_nil_index:*/ !Int !ParsedExpr ![Qualifier]
- | PE_ArrayCompr !ParsedExpr ![Qualifier]
+ | PE_ArrayCompr !ArrayKind !ParsedExpr ![Qualifier]
| PE_Sequ Sequence
| PE_WildCard
| PE_Field !ParsedExpr !(Global FieldSymbol) /* Auxiliary, used during checking */
@@ -1199,7 +1199,10 @@ instance toString KindInfo
| PE_DynamicPattern !ParsedExpr !DynamicType
| PE_Dynamic !ParsedExpr !(Optional DynamicType)
- | PE_Generic !Ident !TypeKind /* AA: For generics, kind indexed identifier */
+ | PE_Generic !Ident !TypeKind /* AA: For generics, kind indexed identifier */
+
+ | PE_TypeSignature !ArrayKind !ParsedExpr
+
| PE_Empty
:: ParsedSelection = PS_Record !Ident !OptionalRecordName
@@ -1214,6 +1217,8 @@ instance toString KindInfo
:: ModuleIdent:==Ident
+:: ArrayKind = OverloadedArray | StrictArray | UnboxedArray;
+
:: GeneratorKind = IsListGenerator | IsOverloadedListGenerator | IsArrayGenerator
:: LineAndColumn = {lc_line :: !Int, lc_column :: !Int}
@@ -1278,6 +1283,8 @@ cIsNotStrict :== False
| DynamicExpr !DynamicExpr
| TypeCodeExpression !TypeCodeExpression
+ | TypeSignature !(Int Int -> (AType,Int,Int)) !Expression
+
| EE
| NoBind ExprInfoPtr /* auxiliary, to store fields that are not specified in a record expression */
| FailExpr !Ident // only allowed on (case) root positions