Changeset 5940 for src/Pugs/Compile.hs

Show
Ignore:
Timestamp:
07/31/05 20:07:25 (3 years ago)
Author:
iblech
svk:copy_cache_prev:
8084
Message:

* Pugs.Compile -- Don't emit [Noop] for the empty arrayref literal ([]).
* t/var/symbolic_deref.t -- Fixed one test.
* PIL2JS:

  • Finally, returning 0- or 1-elem arrays works correctly, causing many tests to pass, currently resmoking...
  • Removed the now unneeded [...] hacks.
  • my ($a, undef, $b) = ... works now.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Compile.hs

    r5890 r5940  
    363363    compile (Syn "," exps) = do 
    364364        compile (App (Var "&infix:,") Nothing exps) 
     365    -- Minor hack, my $a = [] is parsed as my $a = [Noop], resulting in my $a = 
     366    -- [undef], which is wrong. 
     367    compile (Syn "\\[]" [Noop]) = do 
     368        compile (App (Var "&circumfix:[]") Nothing []) 
    365369    compile (Syn "\\[]" exps) = do 
    366370        compile (App (Var "&circumfix:[]") Nothing exps)