Changeset 6589 for src/Pugs/Compile.hs

Show
Ignore:
Timestamp:
08/30/05 20:53:24 (3 years ago)
Author:
putter
Message:

Compile.hs: -CPIL -e 'class C {...}' now works (no longer fails with an error). Next step - remember package/module/class/grammar flavor, so it can tell you what C is.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Compile.hs

    r6432 r6589  
    317317    compile (Syn "but" [obj, block]) = 
    318318        compile $ App (Var "&Pugs::Internals::but_block") Nothing [obj, block] 
     319    compile exp@(Syn "namespace" _) = do 
     320        -- XXX - Is there a better way to wrap Stmts as LValue? 
     321        compile $ App (Syn "sub" 
     322            [ Val . VCode $ mkSub 
     323                { subBody   = Stmts Noop exp 
     324                , subParams = [] 
     325                } 
     326            ]) Nothing [] 
    319327    compile exp = compError exp 
    320328