diff options
| author | krasimir <krasimir@chalmers.se> | 2009-10-28 16:47:01 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-10-28 16:47:01 +0000 |
| commit | 980844a4ad13c0423a3223f0e89e43d6e9be1ba3 (patch) | |
| tree | 810ad7002888c5f5f3847d8a6b7b9773c9672576 /src/GF/Grammar/Parser.y | |
| parent | f2e5281602516e1c0eb4a2f69d64e6c075fb79da (diff) | |
restructure ResParam and ResValue
Diffstat (limited to 'src/GF/Grammar/Parser.y')
| -rw-r--r-- | src/GF/Grammar/Parser.y | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/GF/Grammar/Parser.y b/src/GF/Grammar/Parser.y index 1c6b51e77..320053674 100644 --- a/src/GF/Grammar/Parser.y +++ b/src/GF/Grammar/Parser.y @@ -254,9 +254,9 @@ DataDef ParamDef :: { [(Ident,SrcSpan,Info)] } ParamDef - : Posn Ident '=' ListParConstr Posn { ($2, ($1,$5), ResParam (Just ($4,Nothing))) : - [(f, ($1,$5), ResValue (Just (mkProdSimple co (Cn $2),Nothing))) | (f,co) <- $4] } - | Posn Ident Posn { [($2, ($1,$3), ResParam Nothing)] } + : Posn Ident '=' ListParConstr Posn { ($2, ($1,$5), ResParam (Just $4) Nothing) : + [(f, ($1,$5), ResValue (mkProdSimple co (Cn $2))) | (f,co) <- $4] } + | Posn Ident Posn { [($2, ($1,$3), ResParam Nothing Nothing)] } OperDef :: { [(Ident,SrcSpan,Info)] } OperDef @@ -684,14 +684,14 @@ checkInfoType MTAbstract (id,pos,info) = _ -> failLoc (fst pos) "illegal definition in abstract module" checkInfoType MTResource (id,pos,info) = case info of - ResParam _ -> return () + ResParam _ _ -> return () ResValue _ -> return () ResOper _ _ -> return () ResOverload _ _ -> return () _ -> failLoc (fst pos) "illegal definition in resource module" checkInfoType MTInterface (id,pos,info) = case info of - ResParam _ -> return () + ResParam _ _ -> return () ResValue _ -> return () ResOper _ _ -> return () ResOverload _ _ -> return () @@ -700,14 +700,14 @@ checkInfoType (MTConcrete _) (id,pos,info) = case info of CncCat _ _ _ -> return () CncFun _ _ _ -> return () - ResParam _ -> return () + ResParam _ _ -> return () ResValue _ -> return () ResOper _ _ -> return () ResOverload _ _ -> return () _ -> failLoc (fst pos) "illegal definition in concrete module" checkInfoType (MTInstance _) (id,pos,info) = case info of - ResParam _ -> return () + ResParam _ _ -> return () ResValue _ -> return () ResOper _ _ -> return () _ -> failLoc (fst pos) "illegal definition in instance module" |
