classify_dart 0.1.0
classify_dart: ^0.1.0 copied to clipboard
A library for classifying Dart.
classify_html #
A Dart classifier in Dart. Parses a string of Dart and wraps each token
(keyword, identifier, string, etc) with a span and a defined set of CSS
classes. Used to add syntax coloring to documentation and code examples.
Installation #
Add this to your pubspec.yaml (or create it):
dependencies:
classify_dart: any
Then run the Pub Package Manager (comes with the Dart SDK):
pub install
Usage #
import "package:classify_dart/classify_dart.dart";
main() {
print(classifyDart("void main() { print('Hello World'); }"));
}