From: khartlage Date: Sun, 2 Mar 2003 18:06:46 +0000 (+0000) Subject: improved PHP Scanner X-Git-Url: http://secure.phpeclipse.com improved PHP Scanner --- 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 0826535..04c3935 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 @@ -1585,7 +1585,7 @@ public class Scanner implements IScanner, ITerminalSymbols { default : if (currentCharacter == '$') { - while ( (currentCharacter = source[currentPosition++])=='$') { + while ((currentCharacter = source[currentPosition++]) == '$') { } if (currentCharacter == '{') return TokenNameDOLLAR_LBRACE; @@ -2091,6 +2091,7 @@ public class Scanner implements IScanner, ITerminalSymbols { return new char[] { charOne }; } } + final char[] optimizedCurrentTokenSource2() { //try to return the same char[] build only once @@ -2121,6 +2122,7 @@ public class Scanner implements IScanner, ITerminalSymbols { newEntry2 = max; return r; } + final char[] optimizedCurrentTokenSource3() { //try to return the same char[] build only once @@ -2153,6 +2155,7 @@ public class Scanner implements IScanner, ITerminalSymbols { newEntry3 = max; return r; } + final char[] optimizedCurrentTokenSource4() { //try to return the same char[] build only once @@ -2193,6 +2196,7 @@ public class Scanner implements IScanner, ITerminalSymbols { return r; } + final char[] optimizedCurrentTokenSource5() { //try to return the same char[] build only once @@ -2236,6 +2240,7 @@ public class Scanner implements IScanner, ITerminalSymbols { return r; } + final char[] optimizedCurrentTokenSource6() { //try to return the same char[] build only once @@ -2281,6 +2286,7 @@ public class Scanner implements IScanner, ITerminalSymbols { newEntry6 = max; return r; } + public final void pushLineSeparator() throws InvalidInputException { //see comment on isLineDelimiter(char) for the use of '\n' and '\r' final int INCREMENT = 250; @@ -2578,7 +2584,7 @@ public class Scanner implements IScanner, ITerminalSymbols { //disptach on the second char :-)...cool....but fast ! useAssertAsAnIndentifier = false; - + while (getNextCharAsJavaIdentifierPart()) { };