From 779f9e0062d996e933613017bbdd16980965caf3 Mon Sep 17 00:00:00 2001 From: Andres Gutierrez Date: Fri, 24 Oct 2014 11:03:18 -0500 Subject: [PATCH] Fixing #579 --- Library/ClassMethod.php | 2 +- Library/Compiler.php | 2 +- parser/parser.h | 6 +++--- parser/parser.lemon | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Library/ClassMethod.php b/Library/ClassMethod.php index 8ae0fdecb9..31a3c413e3 100644 --- a/Library/ClassMethod.php +++ b/Library/ClassMethod.php @@ -1907,7 +1907,7 @@ public function compile(CompilationContext $compilationContext) break; case 'char': - if (strlen($defaultValue) > 2) { + if (strlen($defaultValue) > 4) { if (strlen($defaultValue) > 10) { throw new CompilerException("Invalid char literal: '" . substr($defaultValue, 0, 10) . "...'", $variable->getOriginal()); } else { diff --git a/Library/Compiler.php b/Library/Compiler.php index 8ed6e69cc8..ae925f046d 100755 --- a/Library/Compiler.php +++ b/Library/Compiler.php @@ -30,7 +30,7 @@ */ class Compiler { - const VERSION = '0.5.4a'; + const VERSION = '0.5.5a'; /** * @var CompilerFile[] diff --git a/parser/parser.h b/parser/parser.h index e3bcc460c8..c0833e1e18 100644 --- a/parser/parser.h +++ b/parser/parser.h @@ -8,9 +8,9 @@ #define XX_QUESTION 8 #define XX_LIKELY 9 #define XX_UNLIKELY 10 -#define XX_INSTANCEOF 11 -#define XX_OR 12 -#define XX_AND 13 +#define XX_OR 11 +#define XX_AND 12 +#define XX_INSTANCEOF 13 #define XX_BITWISE_OR 14 #define XX_BITWISE_AND 15 #define XX_BITWISE_XOR 16 diff --git a/parser/parser.lemon b/parser/parser.lemon index 51bdb284eb..36c16a75c4 100644 --- a/parser/parser.lemon +++ b/parser/parser.lemon @@ -35,9 +35,9 @@ %right REQUIRE . %right QUESTION . %right LIKELY UNLIKELY . -%left INSTANCEOF . %left OR . %left AND . +%left INSTANCEOF . %left BITWISE_OR BITWISE_AND BITWISE_XOR BITWISE_SHIFTLEFT BITWISE_SHIFTRIGHT . %left EQUALS IDENTICAL LESS GREATER LESSEQUAL GREATEREQUAL NOTIDENTICAL NOTEQUALS . %left ADD SUB CONCAT .