X-Git-Url: http://git.phpeclipse.com 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..55d8783 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; @@ -18,7 +18,9 @@ import java.util.Map; import net.sourceforge.phpdt.internal.compiler.parser.Scanner; import net.sourceforge.phpeclipse.ui.text.rules.AbstractPartitioner; -import org.eclipse.jface.text.Assert; +//incastrix +//import org.eclipse.jface.text.Assert; +import org.eclipse.core.runtime.Assert; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.rules.ICharacterScanner; @@ -268,7 +270,7 @@ public class PHPPartitionScanner implements IPartitionTokenScanner { return false; } ch = document.getChar(position++); // ignore escaped - // character + // character } else if (ch == '"') { return true; } @@ -293,7 +295,7 @@ public class PHPPartitionScanner implements IPartitionTokenScanner { return false; } ch = document.getChar(position++); // ignore escaped - // character + // character } else if (ch == '\'') { return true; } @@ -314,6 +316,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 +350,7 @@ public class PHPPartitionScanner implements IPartitionTokenScanner { return true; } ch = document.getChar(position++); // ignore escaped - // character + // character if (ch != heredocIdent[pos]) { break; }