OLD | NEW |
---|---|
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 #import('../lang.dart'); | |
5 | 4 |
6 /** | 5 /** |
7 * Kinds of tokens that we care to highlight differently. The values of the | 6 * Kinds of tokens that we care to highlight differently. The values of the |
8 * fields here will be used as CSS class names for the generated spans. | 7 * fields here will be used as CSS class names for the generated spans. |
jimhug
2011/11/11 18:02:31
Hmm... I think that this code should find its way
Bob Nystrom
2011/11/11 18:21:28
Yeah, I was think of splitting this out into a sta
| |
9 */ | 8 */ |
10 class Classification { | 9 class Classification { |
11 static final NONE = null; | 10 static final NONE = null; |
12 static final ERROR = "e"; | 11 static final ERROR = "e"; |
13 static final COMMENT = "c"; | 12 static final COMMENT = "c"; |
14 static final IDENTIFIER = "i"; | 13 static final IDENTIFIER = "i"; |
15 static final KEYWORD = "k"; | 14 static final KEYWORD = "k"; |
16 static final OPERATOR = "o"; | 15 static final OPERATOR = "o"; |
17 static final STRING = "s"; | 16 static final STRING = "s"; |
18 static final NUMBER = "n"; | 17 static final NUMBER = "n"; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
242 return Classification.KEYWORD; | 241 return Classification.KEYWORD; |
243 | 242 |
244 case TokenKind.WHITESPACE: | 243 case TokenKind.WHITESPACE: |
245 case TokenKind.END_OF_FILE: | 244 case TokenKind.END_OF_FILE: |
246 return Classification.NONE; | 245 return Classification.NONE; |
247 | 246 |
248 default: | 247 default: |
249 return Classification.NONE; | 248 return Classification.NONE; |
250 } | 249 } |
251 } | 250 } |
OLD | NEW |