Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Issue 9789 - Use new alias syntax for ddoc output. #1790

Merged
merged 1 commit into from

1 participant

@9rnsr 9rnsr merged commit 8f9fe3b into D-Programming-Language:master

1 check passed

Details default Pass: 10
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 23, 2013
  1. Fixes Issue 9789 - Use new alias syntax for ddoc output.

    Andrej Mitrovic authored
This page is out of date. Refresh to see the latest.
View
4 src/doc.c
@@ -937,7 +937,7 @@ void AliasDeclaration::toDocBuffer(OutBuffer *buf, Scope *sc)
buf->writestring("deprecated ");
emitProtection(buf, protection);
- buf->writestring("alias ");
+ buf->printf("alias %s = ", toChars());
if (Dsymbol *s = aliassym) // ident alias
{
@@ -959,8 +959,6 @@ void AliasDeclaration::toDocBuffer(OutBuffer *buf, Scope *sc)
}
}
- buf->writestring(" ");
- buf->writestring(toChars());
buf->writestring(";\n");
}
}
View
11 test/compilable/ddoc9789.d
@@ -0,0 +1,11 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -w -o- -c -Ddtest_results/compilable -o-
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9789
+
+module ddoc9789;
+
+///
+struct S {}
+
+///
+alias A = S;
View
2  test/compilable/extra-files/ddoc1.html
@@ -6,7 +6,7 @@
This module is for ABC
<br><br>
-<dl><dt><big><a name="myint"></a>alias int <u>myint</u>;
+<dl><dt><big><a name="myint"></a>alias <u>myint</u> = int;
</big></dt>
<dd><br><br>
</dd>
View
2  test/compilable/extra-files/ddoc2273.html
@@ -27,7 +27,7 @@
</big></dt>
<dd><br><br>
</dd>
-<dt><big><a name="IndexOf"></a>alias staticIndexOf(T, TList...) <u>IndexOf</u>;
+<dt><big><a name="IndexOf"></a>alias <u>IndexOf</u> = staticIndexOf(T, TList...);
</big></dt>
<dd><br><br>
</dd>
View
30 test/compilable/extra-files/ddoc5446.html
@@ -4,69 +4,69 @@
</head><body>
<h1>ddoc5446</h1>
<br><br>
-<dl><dt><big><a name="This_Foo"></a>alias ddoc5446a.A_Foo <u>This_Foo</u>;
+<dl><dt><big><a name="This_Foo"></a>alias <u>This_Foo</u> = ddoc5446a.A_Foo;
</big></dt>
<dd><br><br>
</dd>
-<dt><big><a name="This_Foo_Alias"></a>alias ddoc5446a.A_Foo <u>This_Foo_Alias</u>;
+<dt><big><a name="This_Foo_Alias"></a>alias <u>This_Foo_Alias</u> = ddoc5446a.A_Foo;
</big></dt>
<dd><br><br>
</dd>
-<dt><big><a name="This_Int"></a>alias int <u>This_Int</u>;
+<dt><big><a name="This_Int"></a>alias <u>This_Int</u> = int;
</big></dt>
<dd><br><br>
</dd>
-<dt><big><a name="This_Enum"></a>alias ddoc5446a.A_Enum <u>This_Enum</u>;
+<dt><big><a name="This_Enum"></a>alias <u>This_Enum</u> = ddoc5446a.A_Enum;
</big></dt>
<dd><br><br>
</dd>
-<dt><big><a name="A_Enum_New"></a>deprecated alias ddoc5446b.<u>A_Enum_New</u> <u>A_Enum_New</u>;
+<dt><big><a name="A_Enum_New"></a>deprecated alias <u>A_Enum_New</u> = ddoc5446b.<u>A_Enum_New</u>;
</big></dt>
<dd><br><br>
</dd>
<dt><big><a name="Bar"></a>struct <u>Bar</u>;
</big></dt>
<dd><br><br>
-<dl><dt><big><a name="Bar.Bar_A_Foo"></a>alias ddoc5446a.A_Foo <u>Bar_A_Foo</u>;
+<dl><dt><big><a name="Bar.Bar_A_Foo"></a>alias <u>Bar_A_Foo</u> = ddoc5446a.A_Foo;
</big></dt>
<dd><br><br>
</dd>
-<dt><big><a name="Bar.Bar_A_Foo_Alias"></a>alias ddoc5446a.A_Foo <u>Bar_A_Foo_Alias</u>;
+<dt><big><a name="Bar.Bar_A_Foo_Alias"></a>alias <u>Bar_A_Foo_Alias</u> = ddoc5446a.A_Foo;
</big></dt>
<dd><br><br>
</dd>
-<dt><big><a name="Bar.Bar_A_Int"></a>alias int <u>Bar_A_Int</u>;
+<dt><big><a name="Bar.Bar_A_Int"></a>alias <u>Bar_A_Int</u> = int;
</big></dt>
<dd><br><br>
</dd>
-<dt><big><a name="Bar.Bar_This_Foo"></a>alias ddoc5446a.A_Foo <u>Bar_This_Foo</u>;
+<dt><big><a name="Bar.Bar_This_Foo"></a>alias <u>Bar_This_Foo</u> = ddoc5446a.A_Foo;
</big></dt>
<dd><br><br>
</dd>
-<dt><big><a name="Bar.Bar_This_Foo_Alias"></a>alias ddoc5446a.A_Foo <u>Bar_This_Foo_Alias</u>;
+<dt><big><a name="Bar.Bar_This_Foo_Alias"></a>alias <u>Bar_This_Foo_Alias</u> = ddoc5446a.A_Foo;
</big></dt>
<dd><br><br>
</dd>
-<dt><big><a name="Bar.Bar_This_Int"></a>alias int <u>Bar_This_Int</u>;
+<dt><big><a name="Bar.Bar_This_Int"></a>alias <u>Bar_This_Int</u> = int;
</big></dt>
<dd><br><br>
</dd>
-<dt><big><a name="Bar.Nested_Alias"></a>alias Nested <u>Nested_Alias</u>;
+<dt><big><a name="Bar.Nested_Alias"></a>alias <u>Nested_Alias</u> = Nested;
</big></dt>
<dd><br><br>
</dd>
-<dt><big><a name="Bar.Fake_Nested"></a>alias .Nested <u>Fake_Nested</u>;
+<dt><big><a name="Bar.Fake_Nested"></a>alias <u>Fake_Nested</u> = .Nested;
</big></dt>
<dd><br><br>
</dd>
<dt><big><a name="Bar.Nested"></a>struct <u>Nested</u>;
</big></dt>
<dd><br><br>
-<dl><dt><big><a name="Bar.Nested.Bar_Nested_Bar_Alias"></a>alias Bar <u>Bar_Nested_Bar_Alias</u>;
+<dl><dt><big><a name="Bar.Nested.Bar_Nested_Bar_Alias"></a>alias <u>Bar_Nested_Bar_Alias</u> = Bar;
</big></dt>
<dd><br><br>
</dd>
-<dt><big><a name="Bar.Nested.Bar_Alias"></a>alias .Bar <u>Bar_Alias</u>;
+<dt><big><a name="Bar.Nested.Bar_Alias"></a>alias <u>Bar_Alias</u> = .Bar;
</big></dt>
<dd><br><br>
</dd>
View
2  test/compilable/extra-files/ddoc7.html
@@ -79,7 +79,7 @@
<dd>Some doc<br><br>
</dd>
-<dt><big><a name="bar"></a>alias foo <u>bar</u>;
+<dt><big><a name="bar"></a>alias <u>bar</u> = foo;
</big></dt>
<dd>More doc<br><br>
View
18 test/compilable/extra-files/ddoc9789.html
@@ -0,0 +1,18 @@
+<html><head>
+ <META http-equiv="content-type" content="text/html; charset=utf-8">
+ <title>ddoc9789</title>
+ </head><body>
+ <h1>ddoc9789</h1>
+<br><br>
+<dl><dt><big><a name="S"></a>struct <u>S</u>;
+</big></dt>
+<dd><br><br>
+</dd>
+<dt><big><a name="A"></a>alias <u>A</u> = S;
+</big></dt>
+<dd><br><br>
+</dd>
+</dl>
+
+ <hr><small>Page generated by <a href="http://dlang.org/ddoc.html">Ddoc</a>. </small>
+ </body></html>
Something went wrong with that request. Please try again.