-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c109c8b
Showing
5 changed files
with
7,508 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
Oops, something went wrong.