improved PHP Scanner
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / php / PHPWordExtractor.java
index aeda784..4fd5ea3 100644 (file)
@@ -11,9 +11,11 @@ Contributors:
 **********************************************************************/
 package net.sourceforge.phpeclipse.phpeditor.php;
 
-import org.eclipse.swt.graphics.Point;
+import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
+
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
+import org.eclipse.swt.graphics.Point;
 
 /**
  * Detects PHP words in documents.
@@ -39,7 +41,7 @@ public class PHPWordExtractor {
 
                        while (position >= 0) {
                                character = document.getChar(position);
-                               if (!Character.isJavaIdentifierPart(character) && (character != '$'))
+                               if (!Scanner.isPHPIdentifierPart(character) && (character != '$'))
                                        break;
                                --position;
                        }
@@ -51,7 +53,7 @@ public class PHPWordExtractor {
 
                        while (position < length) {
                                character = document.getChar(position);
-                               if (!Character.isJavaIdentifierPart(character) && (character != '$'))
+                               if (!Scanner.isPHPIdentifierPart(character) && (character != '$'))
                                        break;
                                ++position;
                        }