2 * Created on May 13, 2003
3 *========================================================================
4 * Modifications history
5 *========================================================================
6 * $Log: not supported by cvs2svn $
7 * Revision 1.1 2004/02/26 02:25:42 agfitzp
8 * renamed packages to match xml & css
10 * Revision 1.1 2004/02/05 03:10:08 agfitzp
13 * Revision 1.1.2.1 2003/12/12 21:37:24 agfitzp
14 * Experimental work for Classes view
16 * Revision 1.2 2003/05/30 20:53:09 agfitzp
17 * 0.0.2 : Outlining is now done as the user types. Some other bug fixes.
19 *========================================================================
21 package net.sourceforge.phpeclipse.js.core.parser;
28 import org.eclipse.jface.text.rules.IWordDetector;
31 * A JavaScript aware word detector.
32 * JavaScript tokens are almost identical to Java so this
33 * class is borrowed from org.eclipse.jdt.internal.ui.text.JavaWordDetector.
35 public class JSWordDetector implements IWordDetector {
38 * @see IWordDetector#isWordStart
39 * JavaScript tokens are almost identical to Java so for now
40 * we can just borrow this behavior.
42 public boolean isWordStart(char c) {
43 return Character.isJavaIdentifierStart(c);
47 * @see IWordDetector#isWordPart
48 * JavaScript tokens are almost identical to Java so for now
49 * we can just borrow this behavior.
51 public boolean isWordPart(char c) {
52 return Character.isJavaIdentifierPart(c);