From: toshihiro <toshihiro>
Date: Mon, 9 Apr 2007 13:30:55 +0000 (+0000)
Subject: 1. Suppress ArrayIndexOutOfBoundsException occurring in a certain case of formatting... 
X-Git-Url: http://secure.phpeclipse.com

1. Suppress ArrayIndexOutOfBoundsException occurring in a certain case of formatting(source-format).
2. Fix concerning #1589521 - 3 character function names invalid?
---

diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Scanner.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Scanner.java
index 5e44d43..eeff2c1 100644
--- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Scanner.java
+++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Scanner.java
@@ -2128,7 +2128,7 @@ public class Scanner implements IScanner, ITerminalSymbols {
 			}
 		} catch (IndexOutOfBoundsException e) {
 			phpMode = true;
-			currentPosition = currentPositionInLine;
+			currentPosition = currentPositionInLine - 1;
 			return TokenNameINLINE_HTML;
 		}
 	}
@@ -3698,6 +3698,8 @@ public class Scanner implements IScanner, ITerminalSymbols {
 			case 3:
 				if ((data[++index] == 's') && (data[++index] == 'e'))
 					return TokenNameuse;
+				else
+					return TokenNameIdentifier;
 			case 5:
 				if ((data[++index] == 'n') && (data[++index] == 's')
 						&& (data[++index] == 'e') && (data[++index] == 't'))