Changeset 7752 for src/Pugs/Lexer.hs

Show
Ignore:
Timestamp:
10/27/05 21:19:10 (3 years ago)
Author:
iblech
Message:

+$arg changed to :$arg, per Larry
(http://www.nntp.perl.org/group/perl.perl6.language/23820).
* examples, t, ext, docs, perl5, src/perl6: Changed +$arg to :$arg (and

related) -- I searched using egrep -r '\+\+?\s*[$@%]', hopefully I've found
all occurances...

* Pugs.Lexer: ":Foo" is not a valid type.
* Pugs.Parser: Parse :$arg, +:$arg etc. (but not :foo($bar) yet, as this

requires changes to the definition of VCode).

* Pugs.Parser: Adjustments to the rule which parses the

invocant-list-delimeter-colon --

method foo (: $a) # positional $a, $a is not an inv param
method foo (:$a) # named $a

Note that I had to use lookAhead and try...

* Pugs.AST.Internals: Minor adjustment WRT the Pugs.Parser change.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Lexer.hs

    r7579 r7752  
    320320ruleType :: GenParser Char st String 
    321321ruleType = literalRule "context" $ do 
    322     -- Valid type names: Foo, Bar::Baz, ::Grtz, ::?CLASS 
    323     lead    <- wordAlpha <|> char ':' 
     322    -- Valid type names: Foo, Bar::Baz, ::Grtz, ::?CLASS, but not :Foo 
     323    lead    <- count 1 wordAlpha <|> string "::" 
    324324    rest    <- many (wordAny <|> oneOf ":&|?") 
    325     return (lead:rest) 
     325    return (lead ++ rest) 
    326326 
    327327{-|