From 98dc5ad753eb7050c3b62451646ed68f65dbd134 Mon Sep 17 00:00:00 2001 From: axelcl Date: Sat, 17 Mar 2007 14:07:31 +0000 Subject: [PATCH] #1493165 phpeclise highlighting fails when using special echo "<<<" --- .../phpeditor/php/PHPPartitionScanner.java | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) 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; } -- 1.7.1