root / tags / v1_0_2_Build_909 / libraries / libIverUtiles / src / com / iver / utiles / console / jedit / JavaScriptTokenMarker.java @ 11150
History | View | Annotate | Download (1.6 KB)
1 |
package com.iver.utiles.console.jedit; |
---|---|
2 |
/*
|
3 |
* JavaScriptTokenMarker.java - JavaScript token marker
|
4 |
* Copyright (C) 1999 Slava Pestov
|
5 |
*
|
6 |
* You may use and modify this package for any purpose. Redistribution is
|
7 |
* permitted, in both source and binary form, provided that this notice
|
8 |
* remains intact in all source distributions of this package.
|
9 |
*/
|
10 |
|
11 |
|
12 |
/**
|
13 |
* JavaScript token marker.
|
14 |
*
|
15 |
* @author Slava Pestov
|
16 |
* @version $Id$
|
17 |
*/
|
18 |
public class JavaScriptTokenMarker extends CTokenMarker |
19 |
{ |
20 |
public JavaScriptTokenMarker()
|
21 |
{ |
22 |
super(false,getKeywords()); |
23 |
} |
24 |
|
25 |
public static KeywordMap getKeywords() |
26 |
{ |
27 |
if(javaScriptKeywords == null) |
28 |
{ |
29 |
javaScriptKeywords = new KeywordMap(false); |
30 |
javaScriptKeywords.add("function",Token.KEYWORD3);
|
31 |
javaScriptKeywords.add("var",Token.KEYWORD3);
|
32 |
javaScriptKeywords.add("else",Token.KEYWORD1);
|
33 |
javaScriptKeywords.add("for",Token.KEYWORD1);
|
34 |
javaScriptKeywords.add("if",Token.KEYWORD1);
|
35 |
javaScriptKeywords.add("in",Token.KEYWORD1);
|
36 |
javaScriptKeywords.add("new",Token.KEYWORD1);
|
37 |
javaScriptKeywords.add("return",Token.KEYWORD1);
|
38 |
javaScriptKeywords.add("while",Token.KEYWORD1);
|
39 |
javaScriptKeywords.add("with",Token.KEYWORD1);
|
40 |
javaScriptKeywords.add("break",Token.KEYWORD1);
|
41 |
javaScriptKeywords.add("case",Token.KEYWORD1);
|
42 |
javaScriptKeywords.add("continue",Token.KEYWORD1);
|
43 |
javaScriptKeywords.add("default",Token.KEYWORD1);
|
44 |
javaScriptKeywords.add("false",Token.LABEL);
|
45 |
javaScriptKeywords.add("this",Token.LABEL);
|
46 |
javaScriptKeywords.add("true",Token.LABEL);
|
47 |
} |
48 |
return javaScriptKeywords;
|
49 |
} |
50 |
|
51 |
// private members
|
52 |
private static KeywordMap javaScriptKeywords; |
53 |
} |