Changeset 5721 for src/Pugs/Compile.hs

Show
Ignore:
Timestamp:
07/20/05 22:35:24 (3 years ago)
Author:
iblech
svk:copy_cache_prev:
7696
Message:

* Usual svn properties.
* "sub foo { try { return }; say 42 }" should return from &foo and not print

42, added a test for this bug to t/builtins/control_flow/try.t (FWIW, PIL2JS
behaves correctly :)).

* Pugs.Compile -- Emit &prefix:<*> for Syn "*" so I can implement *(...) in PIL2JS.
* PIL2JS: Fixed &die (but it's actually a bug in Pugs' Parser, will write a

test tomorrow).

* PIL2JS: New builtins: &Code::arity, &Array::push, &Array::shift, &try,

&statement_control:<for> (works with n-ary subs)

* Updated PIL2JS/README and added PIL2JS to pugs::hack.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Compile.hs

    r5697 r5721  
    359359    compile (Syn "\\{}" exps) = do 
    360360        compile (App (Var "&circumfix:{}") Nothing exps) 
     361    compile (Syn "*" exps) = do 
     362        compile (App (Var "&prefix:*") Nothing exps) 
    361363    compile (Syn "=" [lhs, rhs]) = do 
    362364        lhsC <- enterLValue $ compile lhs