bugfix 1330522: <?xml flagged as error
authorbananeweizen <bananeweizen>
Fri, 20 Jan 2006 08:53:10 +0000 (08:53 +0000)
committerbananeweizen <bananeweizen>
Fri, 20 Jan 2006 08:53:10 +0000 (08:53 +0000)
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Scanner.java

index 803f878..d049c52 100644 (file)
@@ -1846,17 +1846,25 @@ public class Scanner implements IScanner, ITerminalSymbols {
                                                                        return TokenNameINLINE_HTML;
                                                                }
                                                        } else {
-                                                               phpMode = true;
+                                                               boolean foundXML=false;
+                                                               if (getNextChar('X','x')>=0) {
+                                                                       if (getNextChar('M','m')>=0) {
+                                                                               if (getNextChar('L','l')>=0) {
+                                                                                       foundXML=true;
+                                                                               }
+                                                                       }
+                                                               }
+                                                               if (!foundXML) {
+                                                                       phpMode = true;
+                                                               }
                                                                if (phpShortTag) {
                                                                        fFillerToken = TokenNameECHO_INVISIBLE;
                                                                }
                                                                return TokenNameINLINE_HTML;
                                                        }
                                                } else {
-                                                       int test = getNextChar('H', 'h');
-                                                       if (test >= 0) {
-                                                               test = getNextChar('P', 'p');
-                                                               if (test >= 0) {
+                                                       if (getNextChar('H', 'h') >= 0) {
+                                                               if (getNextChar('P', 'p') >= 0) {
                                                                        // <?PHP <?php
                                                                        if (ignorePHPOneLiner) {
                                                                                if (lookAheadLinePHPTag() == TokenNameINLINE_HTML) {