Changeset 5847 for src/Pugs/Bind.hs

Show
Ignore:
Timestamp:
07/27/05 17:52:20 (3 years ago)
Author:
autrijus
svk:copy_cache_prev:
7758
Message:

* This should work:

sub foo (*&block) { &block() }; foo():{ "foo" }

i.e. slurpy non-@ sigils should be treated as slurpy scalars.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Bind.hs

    r5807 r5847  
    134134doBindArray :: Exp -> (Bindings, VInt) -> (Param, Char) -> MaybeError (Bindings, VInt) 
    135135doBindArray _ (xs, -1) (p, '@') = return (((p, emptyArrayExp):xs), -1) 
    136 doBindArray _ (_, -1)  (p, '$') = fail $ "Slurpy array followed by slurpy scalar: " ++ show p 
     136doBindArray _ (_, -1)  (p, _) = fail $ "Slurpy array followed by slurpy scalar: " ++ show p 
    137137doBindArray v (xs, n)  (p, '@') = return (((p, doSlice v n):xs), -1) 
    138 doBindArray v (xs, n)  (p, '$') = case v of 
     138doBindArray v (xs, n)  (p, _) = case v of 
    139139    (Syn "," [])    -> fail $ "Insufficient arguments for slurpy scalar" 
    140140    _               -> return (((p, doIndex v n):xs), n+1) 
    141 doBindArray _ (_, _)  (_, x) = internalError $ "doBindArray: unexpected char: " ++ (show x) 
     141-- doBindArray _ (_, _)  (_, x) = internalError $ "doBindArray: unexpected char: " ++ (show x) 
    142142 
    143143{-|