Skip to content

Commit

Permalink
adding code
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-singer committed Feb 9, 2012
0 parents commit c109c8b
Show file tree
Hide file tree
Showing 5 changed files with 7,508 additions and 0 deletions.
42 changes: 42 additions & 0 deletions ClassifyExample.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#import('dart:html');
#import('../../dart_bleeding/dart/utils/dartdoc/classify.dart', prefix:"classify");

class ClassifyExample {
String code = """
#import('dart:html');
class Sababa {
/* [isCool] enables the cool pre tag */
ru([isCool = true]) {
var p;
if (cool) {
p = new Element.html('<pre>is cool cat</pre>');
} else {
p = new Element.html('<pre>is not cool cat</pre>');
}
// Add to body
document.body.nodes.add(p);
}
}
main() {
new Sababa().ru(ture);
}
""";

ClassifyExample() {
}

void run() {
classify.SourceFile sf = new classify.SourceFile("sf.dart", code);
String c = classify.classifySource(sf);
var e = new Element.html("<pre><source>${c}</source></pre>");
document.body.nodes.add(e);
//print(c);

}
}

void main() {
new ClassifyExample().run();
}
Loading

0 comments on commit c109c8b

Please sign in to comment.