From: axelcl Date: Sat, 17 Mar 2007 14:07:31 +0000 (+0000) Subject: #1493165 phpeclise highlighting fails when using special echo "<<<" X-Git-Url: http://git.phpeclipse.com #1493165 phpeclise highlighting fails when using special echo "<<<" --- diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPPartitionScanner.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPPartitionScanner.java index 514e802..0b8409d 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPPartitionScanner.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPPartitionScanner.java @@ -8,7 +8,7 @@ Contributors: Igor Malinin - initial contribution - $Id: PHPPartitionScanner.java,v 1.34 2006-10-21 23:18:32 pombredanne Exp $ + $Id: PHPPartitionScanner.java,v 1.35 2007-03-17 14:07:31 axelcl Exp $ **********************************************************************/ package net.sourceforge.phpeclipse.phpeditor.php; @@ -268,7 +268,7 @@ public class PHPPartitionScanner implements IPartitionTokenScanner { return false; } ch = document.getChar(position++); // ignore escaped - // character + // character } else if (ch == '"') { return true; } @@ -293,7 +293,7 @@ public class PHPPartitionScanner implements IPartitionTokenScanner { return false; } ch = document.getChar(position++); // ignore escaped - // character + // character } else if (ch == '\'') { return true; } @@ -314,6 +314,14 @@ public class PHPPartitionScanner implements IPartitionTokenScanner { return false; } ch = document.getChar(position++); + // #1493165 start + while (ch == ' ') { + if (position >= end) { + return false; + } + ch = document.getChar(position++); + } + // #1493165 end if (!Scanner.isPHPIdentifierStart(ch)) { return false; } @@ -340,7 +348,7 @@ public class PHPPartitionScanner implements IPartitionTokenScanner { return true; } ch = document.getChar(position++); // ignore escaped - // character + // character if (ch != heredocIdent[pos]) { break; }