if ( type_reference.type_name == null )
return ;
+
+ GLib.StringBuilder modifiers = new GLib.StringBuilder ();
+
+ if ( type_reference.is_dynamic )
+ modifiers.append ( "dynamic " );
+
if ( type_reference.is_weak )
- file.printf ( "<font class=\"%s\">weak</font> ", css_keyword );
+ modifiers.append ( "weak " );
+
+ if ( modifiers.len > 0 )
+ file.printf ( "<font class=\"%s\">%s</font> ", css_keyword, modifiers.str );
+
this.write_type_reference_name ( type_reference, file );
this.write_type_reference_template_arguments ( type_reference, file );
if ( m.is_abstract )
modifiers.append ( " abstract" );
- if ( m.is_virtual )
+ else if ( m.is_virtual )
modifiers.append ( " virtual" );
- if ( m.is_override )
+ else if ( m.is_override )
modifiers.append ( " override" );
if ( m.is_static )
modifiers.append ( " static" );
file.puts ( m.name );
file.puts ( " " );
this.write_parameter_list ( m, file );
+
+ if ( m.is_yields )
+ file.printf ( " <span class=\"%s\">yields</span> ", css_keyword );
+
this.write_exception_list ( m, file );
}
if ( prop.is_virtual )
modifiers.append ( " virtual " );
- if ( prop.is_abstract )
+ else if ( prop.is_abstract )
modifiers.append ( " abstract " );
- if ( prop.is_override )
+ else if ( prop.is_override )
modifiers.append ( " override " );
+ if ( modifiers.len > 0 )
+ file.printf ( " <span class=\"%s\">%s</span> ", css_keyword, modifiers.str );
- file.printf ( " <span class=\"%s\">%s</span> ", css_keyword, modifiers.str );
this.write_type_reference ( prop.return_type, file );
file.printf ( " %s { ", prop.name );
this.write_accessor ( sig, file );
file.printf ( " <span class=\"%s\">signal</span> ", css_keyword );
+
this.write_type_reference ( sig.return_type, file );
file.printf ( " %s ", sig.name );
this.write_parameter_list ( sig, file );
if ( mself == null )
mself = element;
- else if ( mself.name == null )
- mself = mself.parent;
+
+// else if ( mself.name == null )
+// mself = mself.parent;
string package_name = element.file.name;
for ( int i = lst.size-1; i >= 0 ; i-- ) {
Basic el = lst.get ( i );
- if ( el.name != null ) {
- this.write_navi_top_entry ( file, el, mself );
- }
+ this.write_navi_top_entry ( file, el, mself );
}
}
protected void write_navi_child_namespaces_inline ( GLib.FileStream file, Namespace ns, Basic mself ) {
file.printf ( "<ul class=\"%s\">\n", css_navi );
+
+ if ( ns.name == null ) {
+ this.write_navi_child_namespaces_without_childs ( file, (Package)ns.parent, ns );
+ }
+
this.write_navi_child_namespaces_inline_withouth_block ( file, ns, mself );
file.puts ( "</ul>\n" );
}
protected void write_navi_child_namespaces_without_childs ( GLib.FileStream file, NamespaceHandler nsh, Basic mself ) {
Gee.ReadOnlyCollection<Namespace> namespaces = nsh.get_namespace_list ( );
foreach ( Namespace ns in namespaces ) {
+ if ( ns.name == null )
+ continue ;
+
if ( ns == mself )
this.write_navi_entry ( file, ns, mself, css_navi_namespace, false );
else
}
}
- protected void write_child_namespaces ( GLib.FileStream file, NamespaceHandler nh ) {
+ protected void write_child_namespaces ( GLib.FileStream file, NamespaceHandler nh, Basic? mself = null ) {
Gee.ReadOnlyCollection<Namespace> nsl = nh.get_namespace_list ();
if ( nsl.size > 0 ) {
file.printf ( "<h3 class=\"%s\">Namespaces:</h3>\n", css_title );
file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
foreach ( Namespace ns in nsl ) {
if ( ns.name != null ) {
- file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_namespace, css_navi_link, this.get_link(ns, nh), ns.name );
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_namespace, css_navi_link, this.get_link(ns, (mself == null)? nh : mself), ns.name );
}
}
file.puts ( "</ul>\n" );
ns.write_comment ( file );
file.printf ( "\n\t\t\t\t<h2 class=\"%s\">Content:</h2>\n", css_title );
- this.write_child_namespaces ( file, ns );
+ if ( ns.name == null )
+ this.write_child_namespaces ( file, (Package)ns.parent, ns );
+ else
+ this.write_child_namespaces ( file, ns );
+
this.write_child_classes ( file, ns );
this.write_child_interfaces ( file, ns );
this.write_child_structs ( file, ns );
pos = 0;
this.skip_deadh_zone ( ref str, ref chr, linenr, ref pos );
- this.set_prev_chr ( out prevchr, out prevprevchr, 'p' );
+// this.set_prev_chr ( out prevchr, out prevprevchr, 'p' );
return buf.str;
}
return true;
}
- // add a line counter!!
private inline void skip_spaces ( ref string str, ref int pos ) {
for ( unichar chr = str.get_char(); chr != '\0' ; str = str.next_char(), chr = str.get_char() ) {
pos++;
str = str.next_char();
pos++;
+ string tagline = linestart;
+
string? currtagname = "";
unichar prevprevchr = '\0';
unichar prevchr = '\0';
if ( tagname == null )
return null;
+ str = str.next_char();
+// pos++;
+
if ( !this.taglets.contains( tagname ) ) {
string line = this.extract_line ( linestart );
string reportmsg = "Taglet '%s' is not registered.\n".printf( tagname );
return null;
}
+
for ( unichar chr = str.get_char(); chr != '\0' ; str = str.next_char(), chr = str.get_char() ) {
pos++;
continue ;
}
+ tmp = this.newline_handler ( buf, ref linestart, ref str, ref linenr, ref pos, ref linestartnr, ref chr, ref prevchr, ref prevprevchr );
+ if ( chr == '\0' ) {
+ stdout.printf ( ">>WTF<<\n" );
+ break;
+ }
+ else if ( tmp == true ) {
+ continue;
+ }
+
tmp = this.skip_double_spaces ( ref str, buf, chr, ref prevchr, ref prevprevchr );
if ( tmp == true )
continue ;
InlineTaglet rtag = ((InlineTaglet)tag);
rtag.init ( );
- //rtag.parse ( this.settings, tree, this.reporter, linestart.offset(1), linenr, pos, me, buf.str );
- rtag.parse ( this.settings, tree, this.reporter, linestart.offset(1), taglinenr, tagpos, me, buf.str );
+
+ rtag.parse ( this.settings, tree, this.reporter, tagline.offset(1), taglinenr, tagpos, me, buf.str );
return rtag;
}
return false;
}
+ private bool newline_handler ( GLib.StringBuilder buf, ref string linestart, ref string str, ref int linenr, ref int pos, ref int linestartnr, ref unichar chr, ref unichar prevchr, ref unichar prevprevchr ) {
+ if ( chr == '\n' ) {
+ linestartnr = linenr;
+ linestart = str;
+ linenr++;
+ pos = 0;
+
+ this.skip_deadh_zone ( ref str, ref chr, linenr, ref pos );
+ if ( chr == '\0' )
+ return false;
+
+ if ( prevchr == '\n' ) {
+ buf.append_unichar ( '\n' );
+ }
+
+ this.set_prev_chr ( out prevchr, out prevprevchr, '\n' );
+ return true;
+ }
+ return false;
+ }
+
public DocumentationTree? parse ( Valadoc.Tree tree, Valadoc.Basic me, string str2 ) {
string str = str2;
continue ;
}
- if ( chr == '\n' ) {
- linestartnr = linenr;
- linestart = str;
- linenr++;
- pos = 0;
-
- this.skip_deadh_zone ( ref str, ref chr, linenr, ref pos );
- if ( chr == '\0' )
- break;
-
- if ( prevchr == '\n' ) {
- buf.append_unichar ( '\n' );
- }
-
- this.set_prev_chr ( out prevchr, out prevprevchr, '\n' );
- continue ;
+ tmp = this.newline_handler ( buf, ref linestart, ref str, ref linenr, ref pos, ref linestartnr, ref chr, ref prevchr, ref prevprevchr );
+ if ( chr == '\0' ) {
+ break;
}
-/*
- if ( prevchr == '\n' && prevprevchr == '\n' ) {
- buf.append_unichar ( '\n' );
+ else if ( tmp == true ) {
+ continue;
}
-*/
+
tmp = this.skip_double_spaces ( ref str, buf, chr, ref prevchr, ref prevprevchr );
if ( tmp == true )
continue ;