Refactory: smarty.ui plugin.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / parser / Scanner.java
index 6866e27..eeff2c1 100644 (file)
@@ -1438,8 +1438,6 @@ public class Scanner implements IScanner, ITerminalSymbols {
 
                                        while ((currentCharacter == ' ')
                                                        || Character.isWhitespace(currentCharacter)) {
-                                               startPosition = currentPosition;
-                                               currentCharacter = source[currentPosition++];
                                                if ((currentCharacter == '\r')
                                                                || (currentCharacter == '\n')) {
                                                        checkNonExternalizeString();
@@ -1449,6 +1447,8 @@ public class Scanner implements IScanner, ITerminalSymbols {
                                                                currentLine = null;
                                                        }
                                                }
+                                               startPosition = currentPosition;
+                                               currentCharacter = source[currentPosition++];
                                        }
                                        if (tokenizeWhiteSpace
                                                        && (whiteStart != currentPosition - 1)) {
@@ -2128,7 +2128,7 @@ public class Scanner implements IScanner, ITerminalSymbols {
                        }
                } catch (IndexOutOfBoundsException e) {
                        phpMode = true;
-                       currentPosition = currentPositionInLine;
+                       currentPosition = currentPositionInLine - 1;
                        return TokenNameINLINE_HTML;
                }
        }
@@ -3684,8 +3684,8 @@ public class Scanner implements IScanner, ITerminalSymbols {
                                // if ((data[++index] == 'r') && (data[++index] == 'u')
                                // && (data[++index] == 'e'))
                                // return TokenNametrue;
-                               // else
-                               // return TokenNameIdentifier;
+                                else
+                                        return TokenNameIdentifier;
                        case 5:
                                if ((data[++index] == 'h') && (data[++index] == 'r')
                                                && (data[++index] == 'o') && (data[++index] == 'w'))
@@ -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'))