1. Suppress ArrayIndexOutOfBoundsException occurring in a certain case of formatting...
authortoshihiro <toshihiro>
Mon, 9 Apr 2007 13:30:55 +0000 (13:30 +0000)
committertoshihiro <toshihiro>
Mon, 9 Apr 2007 13:30:55 +0000 (13:30 +0000)
2. Fix concerning #1589521 - 3 character function names invalid?

net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Scanner.java

index 5e44d43..eeff2c1 100644 (file)
@@ -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'))