Permalink
Browse files

Perlito5 - parser: fix ($term++ + $term)

  • Loading branch information...
1 parent 76ad670 commit 7f41f0bde8f3d1cd75e30d1ddee17c92d5861a05 @fglock committed Apr 20, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 TODO-perlito5
  2. +1 −1 html/perlito5.js
  3. +1 −1 lib5/Perlito5/Precedence.pm
  4. +1 −1 src5/lib/Perlito5/Precedence.pm
View
@@ -40,7 +40,7 @@ TODO list for Perlito5
* Parser
--- bug: ' $s111++ + $s222 '
+-- add test for fixed bug:' $s111++ + $s222 '
parses as (+$s222)++
-- bug: ' $step++ < $steps '
View
@@ -3356,7 +3356,7 @@ var p5100 = p5pkg['main'];
p5make_sub("Perlito5::Precedence", "is_term", function (List__, p5want) {
var v_token = null;
(v_token = (p5pkg["Perlito5::Precedence"].shift([List__])));
- return (p5or(p5context([(p5str((v_token || (v_token = new p5ArrayRef([])))._array_[p5idx((v_token || (v_token = new p5ArrayRef([])))._array_,0)]) == 'term')], p5want), function () { return p5context([(p5str((v_token || (v_token = new p5ArrayRef([])))._array_[p5idx((v_token || (v_token = new p5ArrayRef([])))._array_,0)]) == 'postfix_or_term')], p5want) }));
+ return (p5or(p5or(p5context([(p5str((v_token || (v_token = new p5ArrayRef([])))._array_[p5idx((v_token || (v_token = new p5ArrayRef([])))._array_,0)]) == 'term')], p5want), function () { return p5context([(p5str((v_token || (v_token = new p5ArrayRef([])))._array_[p5idx((v_token || (v_token = new p5ArrayRef([])))._array_,0)]) == 'postfix_or_term')], p5want) }), function () { return p5context([(p5str((v_token || (v_token = new p5ArrayRef([])))._array_[p5idx((v_token || (v_token = new p5ArrayRef([])))._array_,0)]) == 'postfix')], p5want) }));
});
p5make_sub("Perlito5::Precedence", "is_ident_middle", function (List__, p5want) {
var v_c = null;
@@ -22,7 +22,7 @@ sub Perlito5::Precedence::is_fixity_type {
};
sub Perlito5::Precedence::is_term {
((my $token) = shift());
- ((($token->[0] eq 'term')) || (($token->[0] eq 'postfix_or_term')))
+ (((($token->[0] eq 'term')) || (($token->[0] eq 'postfix_or_term'))) || (($token->[0] eq 'postfix')))
};
sub Perlito5::Precedence::is_ident_middle {
((my $c) = shift());
@@ -30,7 +30,7 @@ sub is_fixity_type {
sub is_term {
my $token = shift;
- ($token->[0] eq 'term') || ($token->[0] eq 'postfix_or_term')
+ ($token->[0] eq 'term') || ($token->[0] eq 'postfix_or_term') || ($token->[0] eq 'postfix')
}
sub is_ident_middle {

0 comments on commit 7f41f0b

Please sign in to comment.