nitdoc: introduce DocCommand `list`
authorAlexandre Terrasa <alexandre@moz-code.org>
Thu, 4 Jun 2015 15:35:12 +0000 (11:35 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Wed, 24 Jun 2015 20:30:00 +0000 (16:30 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

src/doc/doc_commands.nit

index 7241742..e69bb38 100644 (file)
@@ -45,6 +45,8 @@ interface DocCommand
                        return new ArticleCommand(command_string)
                else if command_string.has_prefix("comment:") then
                        return new CommentCommand(command_string)
+               else if command_string.has_prefix("list:") then
+                       return new ListCommand(command_string)
                else if command_string.has_prefix("param:") then
                        return new ParamCommand(command_string)
                else if command_string.has_prefix("return:") then
@@ -107,6 +109,13 @@ class CommentCommand
        super AbstractDocCommand
 end
 
+# A `DocCommand` that includes a list of something.
+#
+# Syntax: `list:kind: <arg>`.
+class ListCommand
+       super AbstractDocCommand
+end
+
 # A `DocCommand` that includes the list of methods tanking a `MType` as parameter.
 #
 # Syntax: `param: MType`.