From 6fefdc2bdbf518c1c22f6a130bb803abe9f174d7 Mon Sep 17 00:00:00 2001 From: johnvg Date: Thu, 2 Aug 2012 11:08:38 +0000 Subject: add pattern match test using =: in expressions, add constructors PE_Matches and IsConstructor in module syntax git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2130 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/syntax.dcl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'frontend/syntax.dcl') diff --git a/frontend/syntax.dcl b/frontend/syntax.dcl index 6b15767..1c76796 100644 --- a/frontend/syntax.dcl +++ b/frontend/syntax.dcl @@ -252,8 +252,8 @@ cIsAFunction :== True cIsNotAFunction :== False :: ParsedDefinition - = PD_Function Position Ident Bool [ParsedExpr] Rhs FunKind - | PD_NodeDef Position ParsedExpr Rhs + = PD_Function Position Ident Bool [ParsedExpr] Rhs FunKind + | PD_NodeDef Position ParsedExpr Rhs | PD_Type ParsedTypeDef | PD_TypeSpec Position Ident Priority (Optional SymbolType) FunSpecials | PD_Class ClassDef [ParsedDefinition] @@ -1214,6 +1214,7 @@ instance toString KindInfo | PE_ArrayCompr !ArrayKind !ParsedExpr ![Qualifier] | PE_Sequ Sequence | PE_WildCard + | PE_Matches !Ident /*expr*/!ParsedExpr /*pattern*/!ParsedExpr !Position | PE_QualifiedIdent !Ident !String @@ -1302,6 +1303,7 @@ cIsNotStrict :== False | ABCCodeExpr ![String] !Bool | MatchExpr !(Global DefinedSymbol) !Expression + | IsConstructor !Expression !(Global DefinedSymbol) /*arity*/!Int !GlobalIndex !Ident !Position | FreeVar FreeVar | Constant !SymbIdent !Int !Priority /* auxiliary clause used during checking */ | ClassVariable !VarInfoPtr /* auxiliary clause used during overloading */ -- cgit v1.2.3