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 eb31667..0157acb 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 @@ -6,7 +6,7 @@ * Created on 05.03.2003 * * @author Stefan Langer (musk) - * @version $Revision: 1.20 $ + * @version $Revision: 1.22 $ */ package net.sourceforge.phpeclipse.phpeditor.php; @@ -43,6 +43,10 @@ public class PHPPartitionScanner implements IPartitionTokenScanner { private int fFileType; private Map tokens = new HashMap(); + public PHPPartitionScanner() { + this(IPHPPartitionScannerConstants.PHP_FILE); + } + public PHPPartitionScanner(int fileType) { this.tokens.put(IPHPPartitionScannerConstants.PHP, new Token(IPHPPartitionScannerConstants.PHP)); this.tokens.put( @@ -270,7 +274,9 @@ public class PHPPartitionScanner implements IPartitionTokenScanner { + " fOffset=" + fOffset); } - unread(); + if (c != ICharacterScanner.EOF) { + unread(); + } if (fContentType != IPHPPartitionScannerConstants.SMARTY && fCurrentLength > 1) { unread(1); IToken token = getToken(fContentType);