src/doc: add doc command DocGraph
authorAlexandre Terrasa <alexandre@moz-code.org>
Wed, 22 Jun 2016 01:19:51 +0000 (21:19 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Thu, 23 Jun 2016 14:25:02 +0000 (10:25 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

src/doc/doc_commands.nit

index 1a7cc1c..1537704 100644 (file)
@@ -55,6 +55,8 @@ interface DocCommand
                        return new CallCommand(command_string)
                else if command_string.has_prefix("code:") then
                        return new CodeCommand(command_string)
+               else if command_string.has_prefix("graph:") then
+                       return new GraphCommand(command_string)
                end
                return new UnknownCommand(command_string)
        end
@@ -151,3 +153,11 @@ end
 class CodeCommand
        super AbstractDocCommand
 end
+
+# A `DocCommand` that display an graph for a `MEntity`.
+#
+# Syntax:
+# * `graph: MEntity::name`
+class GraphCommand
+       super AbstractDocCommand
+end