Index: src/parser/Grammar.pg =================================================================== --- src/parser/Grammar.pg (revision 31254) +++ src/parser/Grammar.pg (working copy) @@ -281,8 +281,14 @@ rule attributeref { '.' + {*} } +rule methodcall { + '.' + {*} +} + rule subscription { '[' ']' {*} } @@ -526,7 +532,8 @@ } rule postop { - #| + | {*} #= methodcall + | {*} #= attributeref | {*} #= subscription #| | {*} #= call Index: src/parser/Actions.pm =================================================================== --- src/parser/Actions.pm (revision 31254) +++ src/parser/Actions.pm (working copy) @@ -520,6 +520,20 @@ } } +method attributeref($/) { + my $attr := $($); + $attr.scope('attribute'); + make $attr; +} + +method methodcall($/) { + my $attrname := $($).name(); + my $call := $($); + $call.pasttype('callmethod'); + $call.name($attrname); + make $call; +} + method subscription($/) { make PAST::Var.new( $( $ ), :scope('keyed')); }