X-Git-Url: http://secure.phpeclipse.com 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 a19a44d..30e835c 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 @@ -39,8 +39,9 @@ public class Scanner implements IScanner, ITerminalSymbols { public boolean phpMode = false; - public boolean phpExpressionTag = false; +// public boolean phpExpressionTag = false; + int fFillerToken = TokenNameEOF; // public Stack encapsedStringStack = null; public char currentCharacter; @@ -1288,11 +1289,15 @@ public class Scanner implements IScanner, ITerminalSymbols { } public int getNextToken() throws InvalidInputException { - phpExpressionTag = false; if (!phpMode) { return getInlinedHTMLToken(currentPosition); - } - if (phpMode) { + } else { + if (fFillerToken!=TokenNameEOF) { + int tempToken; + tempToken = fFillerToken; + fFillerToken=TokenNameEOF; + return tempToken; + } this.wasAcr = false; if (diet) { jumpOverMethodBody(); @@ -1951,6 +1956,7 @@ public class Scanner implements IScanner, ITerminalSymbols { * @throws InvalidInputException */ private int getInlinedHTMLToken(int start) throws InvalidInputException { + boolean phpShortTag = false; // true, if source.length) { currentPosition = source.length; return TokenNameEOF; @@ -1965,23 +1971,27 @@ public class Scanner implements IScanner, ITerminalSymbols { if ((currentCharacter != 'P') && (currentCharacter != 'p')) { if (currentCharacter != '=') { // = 0) { test = getNextChar('P', 'p'); @@ -2022,10 +2032,11 @@ public class Scanner implements IScanner, ITerminalSymbols { } /** + * check if the PHP is only in this line (for CodeFormatter) + * * @return */ private int lookAheadLinePHPTag() { - // check if the PHP is only in this line (for CodeFormatter) int currentPositionInLine = currentPosition; char previousCharInLine = ' '; char currentCharInLine = ' ';