[valadoc] libvaladoc: importer: drop gir support
- From: Florian Brosch <flobrosch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [valadoc] libvaladoc: importer: drop gir support
- Date: Fri, 29 Jul 2011 01:00:18 +0000 (UTC)
commit 5a72523d463c83b2cbeec4ed09caf8f1572d26ac
Author: Florian Brosch <flo brosch gmail com>
Date: Thu Jul 28 13:08:16 2011 +0200
libvaladoc: importer: drop gir support
src/libvaladoc/Makefile.am | 3 -
.../documentation/documentationparser.vala | 569 ----------------
.../documentation/girdocumentationscanner.vala | 610 -----------------
src/libvaladoc/importer/gircomment.vala | 56 --
.../importer/girdocumentationimporter.vala | 708 --------------------
src/libvaladoc/parser/tokentype.vala | 119 +----
src/valadoc/valadoc.vala | 1 -
7 files changed, 3 insertions(+), 2063 deletions(-)
---
diff --git a/src/libvaladoc/Makefile.am b/src/libvaladoc/Makefile.am
index 2bccc57..4b92591 100755
--- a/src/libvaladoc/Makefile.am
+++ b/src/libvaladoc/Makefile.am
@@ -31,15 +31,12 @@ libvaladoc_la_VALASOURCES = \
markupsourcelocation.vala \
markuptokentype.vala \
markupreader.vala \
- documentation/girdocumentationscanner.vala \
documentation/commentscanner.vala \
documentation/documentation.vala \
documentation/documentationparser.vala \
documentation/wiki.vala \
documentation/wikiscanner.vala \
- importer/girdocumentationimporter.vala \
importer/documentationimporter.vala \
- importer/gircomment.vala \
importer/valadocdocumentationimporter.vala \
importer/valadocdocumentationimporterscanner.vala \
api/symbolaccessibility.vala \
diff --git a/src/libvaladoc/documentation/documentationparser.vala b/src/libvaladoc/documentation/documentationparser.vala
index 5a08227..ddafabc 100755
--- a/src/libvaladoc/documentation/documentationparser.vala
+++ b/src/libvaladoc/documentation/documentationparser.vala
@@ -43,16 +43,7 @@ public class Valadoc.DocumentationParser : Object, ResourceLocator {
_comment_parser = new Parser (_settings, _comment_scanner, _reporter);
_comment_scanner.set_parser (_comment_parser);
- _gir_scanner = new GirDocumentationScanner (_settings);
- _gir_parser = new Parser (_settings, _gir_scanner, _reporter);
- _gir_scanner.set_parser (_gir_parser);
-
- _gir_taglet_scanner = new GirDocumentationScanner (_settings);
- _gir_taglet_parser = new Parser (_settings, _gir_taglet_scanner, _reporter);
- _gir_taglet_scanner.set_parser (_gir_taglet_parser);
-
init_valadoc_rules ();
- init_girdoc_rules ();
}
private Settings _settings;
@@ -61,12 +52,8 @@ public class Valadoc.DocumentationParser : Object, ResourceLocator {
private ModuleLoader _modules;
private ContentFactory _factory;
- private GirDocumentationScanner _gir_taglet_scanner;
- private GirDocumentationScanner _gir_scanner;
private WikiScanner _wiki_scanner;
private CommentScanner _comment_scanner;
- private Parser _gir_parser;
- private Parser _gir_taglet_parser;
private Parser _wiki_parser;
private Parser _comment_parser;
@@ -87,48 +74,6 @@ public class Valadoc.DocumentationParser : Object, ResourceLocator {
}
}
- public Comment? parse_gir_comment (Api.Node element, GirComment doc) {
- try {
- _stack.clear ();
-
- if (doc.content != null) {
- _parser = _gir_parser;
- _scanner = _gir_scanner;
- _gir_parser.parse (doc.content, doc.file.get_name (), doc.first_line, doc.first_column);
- } else {
- push (_factory.create_comment ());
- }
-
-
- _parser = _gir_taglet_parser;
- _scanner = _gir_taglet_scanner;
-
- if (doc.return_value != null && !(element is Api.Method && ((Api.Method) element).is_constructor)) {
- push (_factory.create_taglet ("return"));
- _gir_taglet_parser.parse (doc.return_value.content, doc.return_value.file.get_name (), doc.return_value.first_line, doc.return_value.first_column);
- }
-
- var iter = doc.parameters.map_iterator ();
- for (iter.next (); iter.has_next (); iter.next ()) {
- var val = iter.get_value ();
- var key = iter.get_key ();
- if (key != "self") {
- var param = _factory.create_taglet ("param") as Taglets.Param;
- param.parameter_name = key;
- push (param);
- _gir_taglet_parser.parse (val.content, val.file.get_name (), val.first_line, val.first_column);
- }
- }
-
- var doc_comment = (Comment) pop ();
- doc_comment.check (_tree, element, _reporter, _settings);
-
- return doc_comment;
- } catch (ParserError error) {
- return null;
- }
- }
-
public Page? parse_wikipage (WikiPage page, Api.Package pkg) {
if (page.documentation != null) {
return page.documentation;
@@ -293,520 +238,6 @@ public class Valadoc.DocumentationParser : Object, ResourceLocator {
}
}
- private void gir_append_link (Token token) throws ParserError {
- var taglet = _factory.create_taglet ("link") as Taglets.Link;
- if (!(taglet is Inline)) {
- _parser.error (null, "Invalid taglet in this context: link");
- }
- taglet.symbol_name = "c::"+token.to_string ();
- push (taglet);
- }
-
- private bool _gir_is_first_paragraph = true;
-
- private void init_girdoc_rules () {
- StubRule run = new StubRule ();
- run.set_name ("Run");
-
- TokenType.Action add_text = (token) => {
- add_content_string (token.to_string ());
- };
-
- TokenType dot = TokenType.GTKDOC_DOT.action ((token) => { add_content_string ("."); });
- TokenType word = TokenType.GTKDOC_ANY_WORD.action (add_text);
- TokenType space = TokenType.GTKDOC_SPACE.action (add_text);
- TokenType newline = TokenType.GTKDOC_EOL.action ((token) => { add_content_string (" "); });
- Rule unprinted_space = Rule.one_of ({ space.action ((token) => {}), newline.action ((token) => {}) });
- Rule unprinted_spaces = Rule.many ({ unprinted_space });
- Rule optional_unprinted_spaces = Rule.option ({ unprinted_spaces });
-
- Rule raw_text = Rule.many ({
- Rule.one_of ({
- word, space, newline, dot
- })
- .set_reduce (() => {
- var head = (Inline) pop ();
- ((InlineContent) peek ()).content.add (head);
- })
- })
- .set_name ("RawText");
-
- Rule run_with_dot = Rule.many ({
- Rule.one_of ({
- run, dot
- })
- .set_reduce (() => {
- var head = (Inline) pop ();
- ((InlineContent) peek ()).content.add (head);
- })
- })
- .set_name ("FormatedText");
-
- Rule xml_comment_raw = Rule.seq ({
- TokenType.GTKDOC_XML_COMMENT_START,
- Rule.option ({
- Rule.many ({
- Rule.one_of ({
- word.action ((token) => {}),
- space.action ((token) => {}),
- newline.action ((token) => {}),
- dot.action ((token) => {})
- //TODO
- })
- })
- }),
- TokenType.GTKDOC_XML_COMMENT_END
- });
-
-
- Rule xml_comment = Rule.seq ({
- xml_comment_raw
- })
- .set_name ("XmlComment")
- .set_start (() => { push (_factory.create_text ("")); });
-
-
- Rule word_or_function = Rule.seq ({
- TokenType.GTKDOC_ANY_WORD.action ((token) => { push (token); }),
- Rule.option ({
- Rule.many ({
- Rule.one_of ({
- space.action ((token) => {
- if (((Token) peek ()).is_word) {
- push (token);
- }
- }),
- xml_comment_raw
- })
- })
- }),
- Rule.option ({
- TokenType.GTKDOC_FUNCTION_BRACKETS.action ((token) => {
- var last_token = (Token) pop ();
- if (!last_token.is_word) {
- last_token = (Token) pop ();
- }
-
- gir_append_link (last_token);
- })
- }).set_skip (() => {
- var last_token = (Token) pop ();
- if (last_token.is_word) {
- add_content_string (last_token.to_string ());
- } else {
- add_content_string (((Token) pop ()).to_string ());
- add_content_string (last_token.to_string ());
- }
- })
- });
-
- Rule node_link = Rule.one_of ({
- Rule.seq ({
- TokenType.GTKDOC_SYMBOL,
- word.action ((token) => {
- switch (token.to_string ()) {
- case "FALSE":
- case "TRUE":
- case "NULL":
- var myrun = _factory.create_run (Run.Style.MONOSPACED);
- var mytext = _factory.create_text ();
- mytext.content = token.to_string ().down ();
- myrun.content.add (mytext);
- push (myrun);
- break;
-
- default:
- gir_append_link (token);
- break;
- }
- })
- })
- })
- .set_name ("TypeLink");
-
- Rule link_element = Rule.seq ({
- TokenType.GTKDOC_LINK_ELEMENT_OPEN,
- run_with_dot,
- TokenType.GTKDOC_LINK_ELEMENT_CLOSE
- })
- .set_name ("Link")
- .set_start (() => { push (_factory.create_run (Run.Style.NONE)); });
-
- Rule filename_element = Rule.seq ({
- TokenType.GTKDOC_FILENAME_ELEMENT_OPEN,
- raw_text,
- TokenType.GTKDOC_FILENAME_ELEMENT_CLOSE
- })
- .set_name ("Filename")
- .set_start (() => { push (_factory.create_run (Run.Style.MONOSPACED)); });
-
- Rule envar_element = Rule.seq ({
- TokenType.GTKDOC_ENVAR_ELEMENT_OPEN,
- run_with_dot,
- TokenType.GTKDOC_ENVAR_ELEMENT_CLOSE
- })
- .set_name ("Envar")
- .set_start (() => { push (_factory.create_run (Run.Style.MONOSPACED)); });
-
- Rule emphasis_element = Rule.seq ({
- TokenType.GTKDOC_EMPHASIS_ELEMENT_OPEN,
- run_with_dot,
- TokenType.GTKDOC_EMPHASIS_ELEMENT_CLOSE
- })
- .set_name ("Emphasis")
- .set_start (() => { push (_factory.create_run (Run.Style.ITALIC)); });
-
- Rule option_element = Rule.seq ({
- TokenType.GTKDOC_OPTION_ELEMENT_OPEN,
- run_with_dot,
- TokenType.GTKDOC_OPTION_ELEMENT_CLOSE
- })
- .set_name ("Option")
- .set_start (() => { push (_factory.create_run (Run.Style.MONOSPACED)); });
-
- Rule term_element = Rule.seq ({
- TokenType.GTKDOC_TERM_ELEMENT_OPEN,
- run_with_dot,
- TokenType.GTKDOC_TERM_ELEMENT_CLOSE
- })
- .set_name ("Term")
- .set_start (() => { push (_factory.create_run (Run.Style.MONOSPACED)); });
-
- Rule literal_element = Rule.seq ({
- TokenType.GTKDOC_LITERAL_ELEMENT_OPEN,
- run_with_dot,
- TokenType.GTKDOC_LITERAL_ELEMENT_CLOSE
- })
- .set_name ("Literal")
- .set_start (() => { push (_factory.create_run (Run.Style.MONOSPACED)); });
-
- Rule replaceable_element = Rule.seq ({
- TokenType.GTKDOC_REPLACEABLE_ELEMENT_OPEN,
- raw_text,
- TokenType.GTKDOC_REPLACEABLE_ELEMENT_CLOSE
- })
- .set_name ("Replaceable")
- .set_start (() => { push (_factory.create_run (Run.Style.MONOSPACED)); });
-
- Rule guimenuitem_element = Rule.seq ({
- TokenType.GTKDOC_GUI_MENU_ITEM_ELEMENT_OPEN,
- raw_text,
- TokenType.GTKDOC_GUI_MENU_ITEM_ELEMENT_CLOSE
- })
- .set_name ("GuiMenuItem")
- .set_start (() => { push (_factory.create_run (Run.Style.MONOSPACED)); });
-
- Rule struct_name_element = Rule.seq ({
- TokenType.GTKDOC_STRUCTNAME_ELEMENT_OPEN,
- word.action ((token) => {
- gir_append_link (token);
- }),
- TokenType.GTKDOC_STRUCTNAME_ELEMENT_CLOSE
- })
- .set_name ("Structname");
-
- Rule param = Rule.one_of ({
- Rule.seq ({
- TokenType.GTKDOC_PARAM,
- word
- })
- })
- .set_name ("Parameter")
- .set_start (() => { push (_factory.create_run (Run.Style.MONOSPACED)); })
- .set_reduce (() => {
- var head = (Inline) pop ();
- ((InlineContent) peek ()).content.add (head);
- });
-
- run.set_rule (
- Rule.many ({
- Rule.one_of ({
- newline, space, word_or_function, node_link, param, struct_name_element, link_element, xml_comment,
- literal_element, guimenuitem_element, replaceable_element, envar_element, emphasis_element,
- option_element, term_element, filename_element
- })
- })
- .set_name ("Run")
- );
-
- Rule paragraph_element = Rule.seq ({
- TokenType.GTKDOC_PARA_ELEMENT_OPEN,
- run_with_dot,
- TokenType.GTKDOC_PARA_ELEMENT_CLOSE,
- Rule.option ({
- Rule.many({
- Rule.one_of ({
- space.action ((token) => {}),
- newline.action ((token) => {})
- })
- })
- })
- })
- .set_name ("ParagraphElement")
- .set_start (() => { push (_factory.create_paragraph ()); })
- .set_reduce (() => {
- var head = (Block) pop ();
- ((BlockContent) peek ()).content.add (head);
- });
-
- Rule source = Rule.seq ({
- TokenType.GTKDOC_SOURCE_OPEN.action ((token) => { ((GirDocumentationScanner) _scanner).set_code_escape_mode (true); }),
- Rule.many ({
- word.action ((token) => { ((SourceCode) peek ()).code = token.to_string (); })
- })
- .set_start (() => { push (_factory.create_source_code ()); })
- .set_reduce (() => {
- var head = (Inline) pop ();
- ((Paragraph) peek ()).content.add (head);
- }),
- TokenType.GTKDOC_SOURCE_CLOSE.action ((token) => { ((GirDocumentationScanner) _scanner).set_code_escape_mode (false); }),
- optional_unprinted_spaces
- })
- .set_name ("Source")
- .set_start (() => { push (_factory.create_paragraph ()); })
- .set_reduce (() => {
- var head = (Block) pop ();
- ((BlockContent) peek ()).content.add (head);
- });
-
- Rule program_listing_element = Rule.seq ({
- TokenType.GTKDOC_PROGRAMLISTING_ELEMENT_OPEN.action ((token) => { ((GirDocumentationScanner) _scanner).set_code_element_escape_mode (true); }),
- Rule.many ({
- word.action ((token) => { ((SourceCode) peek ()).code = token.to_string (); })
- })
- .set_start (() => { push (_factory.create_source_code ()); })
- .set_reduce (() => {
- var head = (Inline) pop ();
- ((Paragraph) peek ()).content.add (head);
- }),
- TokenType.GTKDOC_PROGRAMLISTING_ELEMENT_CLOSE.action ((token) => { ((GirDocumentationScanner) _scanner).set_code_element_escape_mode (false); }),
- optional_unprinted_spaces
- })
- .set_name ("ProgramListing")
- .set_start (() => { push (_factory.create_paragraph ()); })
- .set_reduce (() => {
- var head = (Block) pop ();
- ((BlockContent) peek ()).content.add (head);
- });
-
- Rule example_element = Rule.seq ({
- Rule.one_of ({
- program_listing_element,
- Rule.seq ({
- TokenType.GTKDOC_EXAMPLE_ELEMENT_OPEN,
- optional_unprinted_spaces,
- Rule.option ({
- TokenType.GTKDOC_TITLE_ELEMENT_OPEN,
- Rule.many ({
- Rule.one_of ({ word.action ((token) => {}) })
- }),
- TokenType.GTKDOC_TITLE_ELEMENT_CLOSE,
- optional_unprinted_spaces
- }),
- program_listing_element,
- TokenType.GTKDOC_EXAMPLE_ELEMENT_CLOSE
- })
- }),
- optional_unprinted_spaces
- })
- .set_name ("SourceElement");
-
- Rule paragraph = Rule.seq ({
- run_with_dot
- })
- .set_name ("Paragraph")
- .set_start (() => { push (_factory.create_paragraph ()); })
- .set_reduce (() => {
- var head = (Block) pop ();
- ((BlockContent) peek ()).content.add (head);
- });
-
- Rule note_element = Rule.seq ({
- TokenType.GTKDOC_NOTE_ELEMENT_OPEN,
- optional_unprinted_spaces,
- Rule.option ({
- paragraph
- }),
- Rule.option ({
- Rule.many ({
- paragraph_element,
- Rule.option ({ paragraph })
- })
- }),
- TokenType.GTKDOC_NOTE_ELEMENT_CLOSE,
- optional_unprinted_spaces
- })
- .set_name ("Note");
-
- Rule warning_element = Rule.seq ({
- TokenType.GTKDOC_WARNING_ELEMENT_OPEN,
- optional_unprinted_spaces,
- Rule.option ({
- paragraph
- }),
- Rule.option ({
- Rule.many ({
- paragraph_element,
- Rule.option ({ paragraph })
- })
- }),
- TokenType.GTKDOC_WARNING_ELEMENT_CLOSE,
- optional_unprinted_spaces
- })
- .set_name ("Warning");
-
- Rule variable_list_element = Rule.seq ({
- TokenType.GTKDOC_VARIABLE_LIST_ELEMENT_OPEN,
- optional_unprinted_spaces,
- Rule.many ({
- Rule.seq ({
- TokenType.GTKDOC_VARIABLE_LIST_ENTRY_ELEMENT_OPEN,
- optional_unprinted_spaces,
-
- TokenType.GTKDOC_TERM_ELEMENT_OPEN,
- optional_unprinted_spaces,
- run_with_dot,
- TokenType.GTKDOC_TERM_ELEMENT_CLOSE.action ((token) => { add_content_string (": "); }),
- optional_unprinted_spaces,
-
- TokenType.GTKDOC_LIST_ITEM_ELEMENT_OPEN,
- optional_unprinted_spaces,
- run_with_dot,
- TokenType.GTKDOC_LIST_ITEM_ELEMENT_CLOSE,
- optional_unprinted_spaces,
-
- TokenType.GTKDOC_VARIABLE_LIST_ENTRY_ELEMENT_CLOSE,
- optional_unprinted_spaces
- })
- .set_start (() => { push (_factory.create_list_item ()); })
- .set_reduce (() => {
- var head = (Content.ListItem) pop ();
- ((Content.List) peek ()).items.add (head);
- })
- }),
- TokenType.GTKDOC_VARIABLE_LIST_ELEMENT_CLOSE,
- optional_unprinted_spaces
- })
- .set_name ("VariableList")
- .set_start (() => { push (_factory.create_list ()); })
- .set_reduce (() => {
- var head = (Block) pop ();
- ((BlockContent) peek ()).content.add (head);
- });
-
- Rule list_element = Rule.seq ({
- TokenType.GTKDOC_ITEMIZED_LIST_ELEMENT_OPEN,
- optional_unprinted_spaces,
- Rule.many ({
- Rule.seq ({
- TokenType.GTKDOC_LIST_ITEM_ELEMENT_OPEN,
- optional_unprinted_spaces,
- run_with_dot,
- TokenType.GTKDOC_LIST_ITEM_ELEMENT_CLOSE,
- optional_unprinted_spaces
- })
- .set_start (() => { push (_factory.create_list_item ()); })
- .set_reduce (() => {
- var head = (Content.ListItem) pop ();
- ((Content.List) peek ()).items.add (head);
- })
- }),
- TokenType.GTKDOC_ITEMIZED_LIST_ELEMENT_CLOSE,
- optional_unprinted_spaces
- })
- .set_name ("ItemizedList")
- .set_start (() => { push (_factory.create_list ()); })
- .set_reduce (() => {
- var head = (Block) pop ();
- ((BlockContent) peek ()).content.add (head);
- });
-
- Rule simple_list_element = Rule.seq ({
- TokenType.GTKDOC_SIMPLELIST_ELEMENT_OPEN,
- optional_unprinted_spaces,
- Rule.many ({
- Rule.seq ({
- TokenType.GTKDOC_MEMBER_ELEMENT_OPEN,
- optional_unprinted_spaces,
- run_with_dot,
- TokenType.GTKDOC_MEMBER_ELEMENT_CLOSE,
- optional_unprinted_spaces
- })
- .set_start (() => { push (_factory.create_list_item ()); })
- .set_reduce (() => {
- var head = (Content.ListItem) pop ();
- ((Content.List) peek ()).items.add (head);
- })
- }),
- TokenType.GTKDOC_SIMPLELIST_ELEMENT_CLOSE,
- optional_unprinted_spaces
- })
- .set_name ("SimpleList")
- .set_start (() => { push (_factory.create_list ()); })
- .set_reduce (() => {
- var head = (Block) pop ();
- ((BlockContent) peek ()).content.add (head);
- });
-
- Rule block_element = Rule.one_of ({
- paragraph_element, list_element, note_element, warning_element, source,
- example_element, variable_list_element, simple_list_element
- })
- .set_name ("Block");
-
- // TODO: find out why the clean version does not work ...
- Rule first_paragraph = Rule.many ({
- Rule.one_of ({
- Rule.seq ({ run }).set_reduce (() => {
- var head = (Inline) pop ();
- ((InlineContent) peek ()).content.add (head);
- }),
- TokenType.GTKDOC_DOT.action ((token) => {
- ((InlineContent) peek ()).content.add (_factory.create_text ("."));
- if (_gir_is_first_paragraph) {
- var head = (Block) pop ();
- ((BlockContent) peek ()).content.add (head);
- push (_factory.create_paragraph ());
- _gir_is_first_paragraph = false;
- }
- })
- })
- })
- .set_name ("BriefDescription")
- .set_start (() => { push (_factory.create_paragraph ()); })
- .set_reduce (() => {
- var head = (Block) pop ();
- ((BlockContent) peek ()).content.add (head);
- _gir_is_first_paragraph = true;
- });
-
- Rule comment = Rule.seq ({
- Rule.option ({
- first_paragraph
- }),
- Rule.option ({
- Rule.many ({
- block_element,
- Rule.option ({ paragraph })
- })
- })
- })
- .set_name ("Comment")
- .set_start (() => { push (_factory.create_comment ()); });
-
- Rule taglet = Rule.many ({
- run_with_dot
- })
- .set_name ("Taglet")
- .set_reduce (() => {
- var head = (Taglet) pop ();
- ((Comment) peek ()).taglets.add (head);
- });
-
- _gir_taglet_parser.set_root_rule (taglet);
- _gir_parser.set_root_rule (comment);
- }
-
private void init_valadoc_rules () {
// Inline rules
diff --git a/src/libvaladoc/parser/tokentype.vala b/src/libvaladoc/parser/tokentype.vala
index 03ecdce..490194a 100755
--- a/src/libvaladoc/parser/tokentype.vala
+++ b/src/libvaladoc/parser/tokentype.vala
@@ -60,65 +60,8 @@ public class Valadoc.TokenType : Object {
public static TokenType ALIGN_RIGHT;
public static TokenType ALIGN_CENTER;
- // Gir, doc-nodes:
- public static TokenType GTKDOC_FUNCTION_BRACKETS;
- public static TokenType GTKDOC_XML_COMMENT_START;
- public static TokenType GTKDOC_XML_COMMENT_END;
- public static TokenType GTKDOC_PARAM;
- public static TokenType GTKDOC_SYMBOL;
- public static TokenType GTKDOC_ANY_WORD;
- public static TokenType GTKDOC_SPACE;
- public static TokenType GTKDOC_EOF;
- public static TokenType GTKDOC_EOL;
- public static TokenType GTKDOC_STRUCTNAME_ELEMENT_CLOSE;
- public static TokenType GTKDOC_STRUCTNAME_ELEMENT_OPEN;
- public static TokenType GTKDOC_LINK_ELEMENT_CLOSE;
- public static TokenType GTKDOC_LINK_ELEMENT_OPEN;
- public static TokenType GTKDOC_ITEMIZED_LIST_ELEMENT_CLOSE;
- public static TokenType GTKDOC_ITEMIZED_LIST_ELEMENT_OPEN;
- public static TokenType GTKDOC_LIST_ITEM_ELEMENT_CLOSE;
- public static TokenType GTKDOC_LIST_ITEM_ELEMENT_OPEN;
- public static TokenType GTKDOC_NOTE_ELEMENT_CLOSE;
- public static TokenType GTKDOC_NOTE_ELEMENT_OPEN;
- public static TokenType GTKDOC_PARA_ELEMENT_CLOSE;
- public static TokenType GTKDOC_PARA_ELEMENT_OPEN;
- public static TokenType GTKDOC_LITERAL_ELEMENT_CLOSE;
- public static TokenType GTKDOC_LITERAL_ELEMENT_OPEN;
- public static TokenType GTKDOC_GUI_MENU_ITEM_ELEMENT_CLOSE;
- public static TokenType GTKDOC_GUI_MENU_ITEM_ELEMENT_OPEN;
- public static TokenType GTKDOC_REPLACEABLE_ELEMENT_CLOSE;
- public static TokenType GTKDOC_REPLACEABLE_ELEMENT_OPEN;
- public static TokenType GTKDOC_WARNING_ELEMENT_CLOSE;
- public static TokenType GTKDOC_WARNING_ELEMENT_OPEN;
- public static TokenType GTKDOC_SOURCE_CLOSE;
- public static TokenType GTKDOC_SOURCE_OPEN;
- public static TokenType GTKDOC_EXAMPLE_ELEMENT_CLOSE;
- public static TokenType GTKDOC_EXAMPLE_ELEMENT_OPEN;
- public static TokenType GTKDOC_TITLE_ELEMENT_CLOSE;
- public static TokenType GTKDOC_TITLE_ELEMENT_OPEN;
- public static TokenType GTKDOC_PROGRAMLISTING_ELEMENT_CLOSE;
- public static TokenType GTKDOC_PROGRAMLISTING_ELEMENT_OPEN;
- public static TokenType GTKDOC_VARIABLE_LIST_ELEMENT_CLOSE;
- public static TokenType GTKDOC_VARIABLE_LIST_ELEMENT_OPEN;
- public static TokenType GTKDOC_VARIABLE_LIST_ENTRY_ELEMENT_CLOSE;
- public static TokenType GTKDOC_VARIABLE_LIST_ENTRY_ELEMENT_OPEN;
- public static TokenType GTKDOC_TERM_ELEMENT_CLOSE;
- public static TokenType GTKDOC_TERM_ELEMENT_OPEN;
- public static TokenType GTKDOC_ENVAR_ELEMENT_CLOSE;
- public static TokenType GTKDOC_ENVAR_ELEMENT_OPEN;
- public static TokenType GTKDOC_OPTION_ELEMENT_CLOSE;
- public static TokenType GTKDOC_OPTION_ELEMENT_OPEN;
- public static TokenType GTKDOC_EMPHASIS_ELEMENT_CLOSE;
- public static TokenType GTKDOC_EMPHASIS_ELEMENT_OPEN;
- public static TokenType GTKDOC_FILENAME_ELEMENT_CLOSE;
- public static TokenType GTKDOC_FILENAME_ELEMENT_OPEN;
- public static TokenType GTKDOC_SIMPLELIST_ELEMENT_CLOSE;
- public static TokenType GTKDOC_SIMPLELIST_ELEMENT_OPEN;
- public static TokenType GTKDOC_MEMBER_ELEMENT_CLOSE;
- public static TokenType GTKDOC_MEMBER_ELEMENT_OPEN;
- public static TokenType GTKDOC_DOT;
- // .valadoc
+ // .valadoc (importer)
public static TokenType VALADOC_COMMENT_START;
public static TokenType VALADOC_COMMENT_END;
public static TokenType VALADOC_ANY_WORD;
@@ -130,6 +73,7 @@ public class Valadoc.TokenType : Object {
internal static void init_token_types () {
if (!initialized) {
+ // valadoc-comments:
ANY = new TokenType.basic ("<any>");
ANY_WORD = new TokenType.basic ("<any-word>");
ANY_NUMBER = new TokenType.basic ("<any-number>");
@@ -166,63 +110,7 @@ public class Valadoc.TokenType : Object {
ALIGN_RIGHT = new TokenType.basic ("))");
ALIGN_CENTER = new TokenType.basic (")(");
- GTKDOC_FUNCTION_BRACKETS = new TokenType.basic ("()");
- GTKDOC_XML_COMMENT_START = new TokenType.basic ("<!--");
- GTKDOC_XML_COMMENT_END = new TokenType.basic ("-->");
- GTKDOC_PARAM = new TokenType.basic ("<c-parameter>");
- GTKDOC_SYMBOL = new TokenType.basic ("<symbol>");
- GTKDOC_STRUCTNAME_ELEMENT_CLOSE = new TokenType.basic ("</structname>");
- GTKDOC_STRUCTNAME_ELEMENT_OPEN = new TokenType.basic ("<structname>");
- GTKDOC_LINK_ELEMENT_CLOSE = new TokenType.basic ("</link>");
- GTKDOC_LINK_ELEMENT_OPEN = new TokenType.basic ("<link>");
- GTKDOC_ITEMIZED_LIST_ELEMENT_CLOSE = new TokenType.basic ("</itemizedlist>");
- GTKDOC_ITEMIZED_LIST_ELEMENT_OPEN = new TokenType.basic ("<itemizedlist>");
- GTKDOC_LIST_ITEM_ELEMENT_CLOSE = new TokenType.basic ("</listitem>");
- GTKDOC_LIST_ITEM_ELEMENT_OPEN = new TokenType.basic ("<listitem>");
- GTKDOC_NOTE_ELEMENT_CLOSE = new TokenType.basic ("</note>");
- GTKDOC_NOTE_ELEMENT_OPEN = new TokenType.basic ("<note>");
- GTKDOC_PARA_ELEMENT_CLOSE = new TokenType.basic ("</para>");
- GTKDOC_PARA_ELEMENT_OPEN = new TokenType.basic ("<para>");
- GTKDOC_LITERAL_ELEMENT_CLOSE = new TokenType.basic ("</literal>");
- GTKDOC_LITERAL_ELEMENT_OPEN = new TokenType.basic ("<literal>");
- GTKDOC_GUI_MENU_ITEM_ELEMENT_CLOSE = new TokenType.basic ("</guimenuitem>");
- GTKDOC_GUI_MENU_ITEM_ELEMENT_OPEN = new TokenType.basic ("<guimenuitem>");
- GTKDOC_REPLACEABLE_ELEMENT_CLOSE = new TokenType.basic ("</replaceable>");
- GTKDOC_REPLACEABLE_ELEMENT_OPEN = new TokenType.basic ("<replaceable>");
- GTKDOC_WARNING_ELEMENT_CLOSE = new TokenType.basic ("</warning>");
- GTKDOC_WARNING_ELEMENT_OPEN = new TokenType.basic ("<warning>");
- GTKDOC_SOURCE_CLOSE = new TokenType.basic ("|]");
- GTKDOC_SOURCE_OPEN = new TokenType.basic ("[|");
- GTKDOC_EXAMPLE_ELEMENT_CLOSE = new TokenType.basic ("</example>");
- GTKDOC_EXAMPLE_ELEMENT_OPEN = new TokenType.basic ("<example>");
- GTKDOC_TITLE_ELEMENT_CLOSE = new TokenType.basic ("</title>");
- GTKDOC_TITLE_ELEMENT_OPEN = new TokenType.basic ("<title>");
- GTKDOC_PROGRAMLISTING_ELEMENT_CLOSE = new TokenType.basic ("</programlisting>");
- GTKDOC_PROGRAMLISTING_ELEMENT_OPEN = new TokenType.basic ("<programlisting>");
- GTKDOC_VARIABLE_LIST_ELEMENT_CLOSE = new TokenType.basic ("</variablelist>");
- GTKDOC_VARIABLE_LIST_ELEMENT_OPEN = new TokenType.basic ("<variablelist>");
- GTKDOC_VARIABLE_LIST_ENTRY_ELEMENT_CLOSE = new TokenType.basic ("</varlistentry>");
- GTKDOC_VARIABLE_LIST_ENTRY_ELEMENT_OPEN = new TokenType.basic ("<varlistentry>");
- GTKDOC_TERM_ELEMENT_CLOSE = new TokenType.basic ("</term>");
- GTKDOC_TERM_ELEMENT_OPEN = new TokenType.basic ("<term>");
- GTKDOC_ENVAR_ELEMENT_CLOSE = new TokenType.basic ("</envar>");
- GTKDOC_ENVAR_ELEMENT_OPEN = new TokenType.basic ("<envar>");
- GTKDOC_OPTION_ELEMENT_CLOSE = new TokenType.basic ("</option>");
- GTKDOC_OPTION_ELEMENT_OPEN = new TokenType.basic ("<option>");
- GTKDOC_EMPHASIS_ELEMENT_CLOSE = new TokenType.basic ("</emphasis>");
- GTKDOC_EMPHASIS_ELEMENT_OPEN = new TokenType.basic ("<emphasis>");
- GTKDOC_FILENAME_ELEMENT_CLOSE = new TokenType.basic ("</filename>");
- GTKDOC_FILENAME_ELEMENT_OPEN = new TokenType.basic ("<filename>");
- GTKDOC_SIMPLELIST_ELEMENT_CLOSE = new TokenType.basic ("</simplelist>");
- GTKDOC_SIMPLELIST_ELEMENT_OPEN = new TokenType.basic ("<simplelist>");
- GTKDOC_MEMBER_ELEMENT_CLOSE = new TokenType.basic ("</member>");
- GTKDOC_MEMBER_ELEMENT_OPEN = new TokenType.basic ("<member>");
- GTKDOC_DOT = new TokenType.basic (".");
- GTKDOC_ANY_WORD = ANY_WORD;
- GTKDOC_EOL = TokenType.EOL;
- GTKDOC_SPACE = SPACE;
- GTKDOC_EOF = EOF;
-
+ // .valadoc (importer)
VALADOC_COMMENT_START = new TokenType.basic ("/*");
VALADOC_COMMENT_END = new TokenType.basic ("*/");
VALADOC_ANY_WORD = ANY_WORD;
@@ -230,7 +118,6 @@ public class Valadoc.TokenType : Object {
VALADOC_TAB = TAB;
VALADOC_EOL = EOL;
-
initialized = true;
}
}
diff --git a/src/valadoc/valadoc.vala b/src/valadoc/valadoc.vala
index 4969deb..52acb97 100755
--- a/src/valadoc/valadoc.vala
+++ b/src/valadoc/valadoc.vala
@@ -350,7 +350,6 @@ public class ValaDoc : Object {
}
DocumentationImporter[] importers = {
- new GirDocumentationImporter (doctree, docparser, modules, settings, reporter),
new ValadocDocumentationImporter (doctree, docparser, modules, settings, reporter)
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]