Skip to content

Commit

Permalink
BUGFIX php-peg E_STRICT fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Harvey committed Apr 12, 2012
1 parent 2b8e14f commit 0dd4d43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions thirdparty/php-peg/Compiler.php
Expand Up @@ -273,7 +273,7 @@ function __construct( $value ) {
parent::__construct( 'literal', "'" . substr($value,1,-1) . "'" );
}

function match_code() {
function match_code( $value ) {
// We inline single-character matches for speed
if ( !$this->contains_expression() && strlen( eval( 'return '. $this->value . ';' ) ) == 1 ) {
return $this->match_fail_conditional( 'substr($this->string,$this->pos,1) == '.$this->value,
Expand All @@ -298,7 +298,7 @@ function __construct( $value ) {
parent::__construct('rx', self::escape($value));
}

function match_code() {
function match_code( $value ) {
return parent::match_code("'{$this->value}'");
}
}
Expand All @@ -309,7 +309,7 @@ function __construct( $optional ) {
}

/* Call recursion indirectly */
function match_code() {
function match_code( $value ) {
$code = parent::match_code( '' ) ;
return $this->value ? $code->replace( array( 'FAIL' => NULL )) : $code ;
}
Expand Down

0 comments on commit 0dd4d43

Please sign in to comment.