| 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 | 4 |
| 5 #library('classify'); |
| 6 |
| 7 #import('../../frog/lang.dart'); |
| 8 #import('markdown.dart', prefix: 'md'); |
| 9 |
| 5 /** | 10 /** |
| 6 * Kinds of tokens that we care to highlight differently. The values of the | 11 * Kinds of tokens that we care to highlight differently. The values of the |
| 7 * fields here will be used as CSS class names for the generated spans. | 12 * fields here will be used as CSS class names for the generated spans. |
| 8 */ | 13 */ |
| 9 class Classification { | 14 class Classification { |
| 10 static final NONE = null; | 15 static final NONE = null; |
| 11 static final ERROR = "e"; | 16 static final ERROR = "e"; |
| 12 static final COMMENT = "c"; | 17 static final COMMENT = "c"; |
| 13 static final IDENTIFIER = "i"; | 18 static final IDENTIFIER = "i"; |
| 14 static final KEYWORD = "k"; | 19 static final KEYWORD = "k"; |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 return Classification.KEYWORD; | 240 return Classification.KEYWORD; |
| 236 | 241 |
| 237 case TokenKind.WHITESPACE: | 242 case TokenKind.WHITESPACE: |
| 238 case TokenKind.END_OF_FILE: | 243 case TokenKind.END_OF_FILE: |
| 239 return Classification.NONE; | 244 return Classification.NONE; |
| 240 | 245 |
| 241 default: | 246 default: |
| 242 return Classification.NONE; | 247 return Classification.NONE; |
| 243 } | 248 } |
| 244 } | 249 } |
| OLD | NEW |