diff --git a/README.md b/README.md index 603f024..35bc363 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,10 @@ The "--syntaxCheck" option prints a listing of any errors or warnings found while lexing or parsing the given source file. It does not do any semantic analysis and it does not compile the code. +### Style Check +The "--styleCheck" option checks the names of packages, variables, enums, +classes, and other things for consistency with the Phobos style guide. + ### Line of Code Count The "--sloc" or "-l" option prints the number of lines of code in the file. Instead of simply printing the number of line breaks, this counts the number of @@ -71,6 +75,10 @@ CTAGS output uses the following tag kinds: More information on the CTAGS format can be found [here](http://ctags.sourceforge.net/FORMAT). +### Outline +The "--outline" option parses the given D source file and writes an simple +outline of the file's declarations to stdout. + ### AST Dump The "--ast" or "--xml" options will dump the complete abstract syntax tree of the given source file to standard output in XML format. JSON output is planned diff --git a/outliner.d b/outliner.d index 9f3db55..bfec52e 100644 --- a/outliner.d +++ b/outliner.d @@ -90,8 +90,11 @@ class Outliner : ASTVisitor override void visit(TemplateDeclaration templateDeclaration) { printIndentation(); - output.writeln("template", templateDeclaration.name.text, " : ", + output.writeln("template ", templateDeclaration.name.text, " : ", templateDeclaration.name.line); + indent(); + templateDeclaration.accept(this); + outdent(); finish(); }