Changeset 4861 for src/Pugs/Compile/PIR.hs
- Timestamp:
- 06/20/05 01:56:56 (4 years ago)
- svk:copy_cache_prev:
- 6641
- Files:
-
- 1 modified
-
src/Pugs/Compile/PIR.hs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Compile/PIR.hs
r4860 r4861 8 8 import Emit.Common 9 9 import Pugs.Types 10 import Pugs.Eval 10 11 import Emit.PIR 11 12 import Pugs.Pretty … … 280 281 compile exp@(Syn "until" _) = compLoop exp 281 282 compile (Syn "{}" (x:xs)) = compile (App (Var "&postcircumfix:{}") (Just x) xs) 282 compile (Syn "[]" (x:xs)) = compile (App (Var "&postcircumfix:[]") (Just x) xs) 283 compile (Syn "[]" (x:xs)) = do 284 compile (App (Var "&postcircumfix:[]") (Just x) xs) 283 285 compile (Syn "," exps) = do 284 286 compile (App (Var "&infix:,") Nothing exps) … … 287 289 compile (Syn "\\{}" exps) = do 288 290 compile (App (Var "&circumfix:{}") Nothing exps) 289 compile (Syn "=" exps) = do 290 (lhsC, rhsC) <- compile exps 291 compile (Syn "=" [lhs, rhs]) = do 292 lhsC <- enterLValue $ compile lhs 293 rhsC <- enterRValue $ compile rhs 291 294 return $ PAssign [lhsC] rhsC 292 295 compile (Syn ":=" exps) = do 293 (lhsC, rhsC) <- compile exps296 (lhsC, rhsC) <- enterLValue $ compile exps 294 297 return $ PBind [lhsC] rhsC 295 298 compile (Syn syn [lhs, exp]) | last syn == '=' = do … … 425 428 tell $ map StmtIns $ callBlock appC blockC 426 429 return tempPMC 430 trans (PApp (TCxtLValue _) (PExp (PVar "&postcircumfix:[]")) [(PExp lhs), rhs]) = do 431 lhsC <- trans lhs 432 rhsC <- trans rhs 433 return (KEYED lhsC rhsC) 427 434 trans (PApp cxt fun args) = do 428 435 funC <- case fun of
