Changeset 6432 for src/Pugs/Lexer.hs

Show
Ignore:
Timestamp:
08/23/05 23:42:59 (3 years ago)
Author:
iblech
Message:

* Pugs.AST.Scope: Reorder the declarations of the various scope types -- SLet

and STemp do something to *existing* variables. Accidentally, this causes
temp.t to pass on normal Pugs!

* Pugs.Lexer, Pugs.Compile: Acommodate for that change.
* PIL2JS: temp! let!

  • PIL: All JS functions have a block_leave_hooks array now, containing native JS functions to be called at block exit.
  • PIL::PPad uses this variable to implement the (possible) variable restoration needed for temp and let.

* t/var/let.t, t/var/temp.t: Should "temp @array[$index]" work? I think so, but

Pugs doesn't even parse that. Added appropriate tests in a =pod block.
BTW, let.t passes 7/7, temp.t passes 22/22 (with TODO tests).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Lexer.hs

    r6393 r6432  
    279279ruleScopeName :: RuleParser String 
    280280ruleScopeName = choice . map symbol . map (map toLower) . map (tail . show) 
    281     $ [SState .. STemp] 
     281    $ [SState .. SOur] 
    282282 
    283283postSpace :: GenParser Char st a -> GenParser Char st a