Index: branches/change-tagging/extensions/AbuseFilter/AbuseFilter.parser.php |
— | — | @@ -558,21 +558,15 @@ |
559 | 559 | throw new AFPEexception( "Expected ( at char {$this->mCur->value}" ); |
560 | 560 | wfProfileIn( __METHOD__."-loadargs" ); |
561 | 561 | $args = array(); |
562 | | - if( $this->mCur->type != AFPToken::TBrace || $this->mCur->value != ')' ) |
563 | | - do { |
564 | | - $this->move(); |
565 | | - $r = new AFPData(); |
566 | | - try { |
567 | | - $this->doLevelAtom( $r ); |
568 | | - } catch (AFPException $e) { |
569 | | - $this->move( -1 ); |
570 | | - $this->doLevelSet( $r ); |
571 | | - } |
572 | | - $args[] = $r; |
573 | | - } while( $this->mCur->type == AFPToken::TComma ); |
| 562 | + do { |
| 563 | + $this->move(); |
| 564 | + $r = new AFPData(); |
| 565 | + $this->doLevelSet( $r ); |
| 566 | + $args[] = $r; |
| 567 | + } while( $this->mCur->type == AFPToken::TComma ); |
574 | 568 | |
575 | 569 | if( $this->mCur->type != AFPToken::TBrace || $this->mCur->value != ')' ) { |
576 | | - throw new AFPException( "Expected ) at char {$this->mCur->pos}" ); |
| 570 | + throw new AFPException( "Expected ) at char {$this->mCur->pos}, instead I see {$this->mCur->value}, a {$this->mCur->type}" ); |
577 | 571 | } |
578 | 572 | wfProfileOut( __METHOD__."-loadargs" ); |
579 | 573 | |
Index: branches/change-tagging/extensions/AbuseFilter/phpTest.php |
— | — | @@ -4,10 +4,7 @@ |
5 | 5 | * Runs tests against the PHP parser. |
6 | 6 | */ |
7 | 7 | |
8 | | -require_once ( getenv('MW_INSTALL_PATH') !== false |
9 | | - ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc" |
10 | | - : dirname( __FILE__ ) . '/../../maintenance/commandLine.inc' ); |
11 | | - |
| 8 | +require_once( '/home/andrew/wm-svn/phase3/maintenance/commandLine.inc' ); |
12 | 9 | $tester = new AbuseFilterParser; |
13 | 10 | |
14 | 11 | $test_path = dirname( __FILE__ )."/parser_native/tests"; |
— | — | @@ -47,4 +44,4 @@ |
48 | 45 | } |
49 | 46 | } |
50 | 47 | |
51 | | -print "$pass tests passed out of $check\n"; |
\ No newline at end of file |
| 48 | +print "$pass tests passed out of $check\n"; |