2 * $RCSfile: JSScanner.java,v $
5 * CH-1700 Fribourg, Switzerland
8 *========================================================================
9 * Modifications history
10 *========================================================================
11 * $Log: not supported by cvs2svn $
12 * Revision 1.1 2004/02/26 02:25:42 agfitzp
13 * renamed packages to match xml & css
15 * Revision 1.1 2004/02/05 03:10:08 agfitzp
18 * Revision 1.1.2.1 2003/12/12 21:37:24 agfitzp
19 * Experimental work for Classes view
21 * Revision 1.1 2003/05/28 15:17:12 agfitzp
22 * net.sourceforge.phpeclipse.js.core 0.0.1 code base
24 *========================================================================
27 package net.sourceforge.phpeclipse.js.core.parser;
30 import org.eclipse.jface.text.rules.*;
31 import org.eclipse.jface.text.*;
33 import org.eclipse.swt.graphics.Color;
38 * @author $Author: jsurfer $, $Date: 2004-09-02 18:14:38 $
40 * @version $Revision: 1.1 $
42 public class JSScanner extends RuleBasedScanner
45 * Creates a new JSScanner object.
49 public JSScanner(Color aColor)
51 List rules = new ArrayList();
52 IToken procInstr = new Token(new TextAttribute(aColor));
54 // Add generic whitespace rule.
55 rules.add(new WhitespaceRule(new JSWhitespaceDetector()));
57 IRule[] result = new IRule[rules.size()];
58 rules.toArray(result);