Initialize the command from the CommandParser data

Property definitions

nitc :: commands_parser $ DocCommand :: parser_init
	# Initialize the command from the CommandParser data
	fun parser_init(arg: String, options: CmdOptions): CmdMessage do
		var filter = cmd_filter
		var opt_vis = options.opt_visibility("min-visibility")
		if opt_vis != null then filter.min_visibility = opt_vis
		var opt_fictive = options.opt_bool("no-fictive")
		if opt_fictive != null then filter.accept_fictive = not opt_fictive
		var opt_test = options.opt_bool("no-test")
		if opt_test != null then filter.accept_test = not opt_test
		var opt_redef = options.opt_bool("no-redef")
		if opt_redef != null then filter.accept_redef = not opt_redef
		var opt_extern = options.opt_bool("no-extern")
		if opt_extern != null then filter.accept_extern = not opt_extern
		var opt_example = options.opt_bool("no-example")
		if opt_example != null then filter.accept_example = not opt_example
		var opt_attr = options.opt_bool("no-attribute")
		if opt_attr != null then filter.accept_attribute = not opt_attr
		var opt_doc = options.opt_bool("no-empty-doc")
		if opt_doc != null then filter.accept_empty_doc = not opt_doc
		var opt_inh = options.opt_mentity(model, "inherit")
		if opt_inh != null then filter.accept_inherited = opt_inh
		var opt_match = options.opt_string("match")
		if opt_match != null then filter.accept_full_name = opt_match
		self.filter = filter
		return init_command
	end
src/doc/commands/commands_parser.nit:256,2--281,4

nitc :: commands_parser $ CmdEntity :: parser_init
	redef fun parser_init(mentity_name, options) do
		self.mentity_name = mentity_name
		return super
	end
src/doc/commands/commands_parser.nit:285,2--288,4

nitc :: commands_parser $ CmdCode :: parser_init
	redef fun parser_init(mentity_name, options) do
		var opt_format = options.opt_string("format")
		if opt_format != null then format = opt_format
		return super
	end
src/doc/commands/commands_parser.nit:326,2--330,4

nitc :: commands_parser $ CmdGraph :: parser_init
	redef fun parser_init(mentity_name, options) do
		var opt_format = options.opt_string("format")
		if opt_format != null then format = opt_format
		return super
	end
src/doc/commands/commands_parser.nit:364,2--368,4

nitc :: commands_parser $ CmdList :: parser_init
	redef fun parser_init(mentity_name, options) do
		var opt_page = options.opt_int("page")
		if opt_page != null then page = opt_page
		var opt_limit = options.opt_int("limit")
		if opt_limit != null then limit = opt_limit
		return super
	end
src/doc/commands/commands_parser.nit:292,2--298,4

nitc :: commands_parser $ CmdComment :: parser_init
	redef fun parser_init(mentity_name, options) do
		var opt_full_doc = options.opt_bool("only-synopsis")
		if opt_full_doc != null then full_doc = not opt_full_doc
		var opt_fallback = options.opt_bool("no-fallback")
		if opt_fallback != null then fallback = not opt_fallback
		var opt_format = options.opt_string("format")
		if opt_format != null then format = opt_format
		return super
	end
src/doc/commands/commands_parser.nit:304,2--312,4

nitc :: commands_parser $ CmdCatalogPerson :: parser_init
	redef fun parser_init(mentity_name, options) do
		person_name = mentity_name
		return super
	end
src/doc/commands/commands_parser.nit:391,2--394,4

nitc :: commands_parser $ CmdSearch :: parser_init
	redef fun parser_init(mentity_name, options) do
		query = mentity_name
		return super
	end
src/doc/commands/commands_parser.nit:334,2--337,4

nitc :: commands_parser $ CmdModelEntities :: parser_init
	redef fun parser_init(kind, options) do
		self.kind = kind
		return super
	end
src/doc/commands/commands_parser.nit:357,2--360,4

nitc :: commands_parser $ CmdInheritanceGraph :: parser_init
	redef fun parser_init(mentity_name, options) do
		var opt_pdepth = options.opt_int("pdepth")
		if opt_pdepth != null then pdepth = opt_pdepth
		var opt_cdepth = options.opt_int("cdepth")
		if opt_cdepth != null then cdepth = opt_cdepth
		return super
	end
src/doc/commands/commands_parser.nit:372,2--378,4

nitc :: commands_parser $ CmdCatalogTag :: parser_init
	redef fun parser_init(mentity_name, options) do
		tag = mentity_name
		return super
	end
src/doc/commands/commands_parser.nit:384,2--387,4

nitc :: commands_parser $ CmdAncestors :: parser_init
	redef fun parser_init(mentity_name, options) do
		var opt_parents = options.opt_bool("no-parents")
		if opt_parents != null then parents = not opt_parents
		return super
	end
src/doc/commands/commands_parser.nit:341,2--345,4

nitc :: commands_parser $ CmdDescendants :: parser_init
	redef fun parser_init(mentity_name, options) do
		var opt_children = options.opt_bool("no-children")
		if opt_children != null then children = not opt_children
		return super
	end
src/doc/commands/commands_parser.nit:349,2--353,4