comparison dmd/ddoc/DocComment.d @ 152:4092a614a9f3

moved Escape and Macro to ddoc folder
author Trass3r
date Wed, 15 Sep 2010 03:00:30 +0200
parents 786ea1839396
children 560eaedcb7a2
comparison
equal deleted inserted replaced
151:766e6dc390e1 152:4092a614a9f3
1 module dmd.ddoc.DocComment; 1 module dmd.ddoc.DocComment;
2 2
3 import dmd.ddoc.Escape;
4 import dmd.ddoc.Macro;
3 import dmd.ddoc.Sections; 5 import dmd.ddoc.Sections;
4 import dmd.Array; 6 import dmd.Array;
5 import dmd.Macro;
6 import dmd.Escape;
7 import dmd.Scope; 7 import dmd.Scope;
8 import dmd.Dsymbol; 8 import dmd.Dsymbol;
9 import dmd.OutBuffer; 9 import dmd.OutBuffer;
10 10
11 //! 11 //!
26 26
27 static DocComment parse(Scope sc, Dsymbol s, string comment) 27 static DocComment parse(Scope sc, Dsymbol s, string comment)
28 { 28 {
29 unsigned idlen; 29 unsigned idlen;
30 30
31 //printf("parse(%s): '%s'\n", s.toChars(), comment); 31 // writef("parse(%s): '%s'\n", s.toChars(), comment);
32 if (sc.lastdc && isDitto(comment)) 32 if (sc.lastdc && isDitto(comment))
33 return null; 33 return null;
34 34
35 DocComment dc = new DocComment(); 35 DocComment dc = new DocComment();
36 if (!comment) 36 if (!comment)
52 52
53 sc.lastdc = dc; 53 sc.lastdc = dc;
54 return dc; 54 return dc;
55 } 55 }
56 56
57 /************************************************
58 * Parse macros out of Macros: section.
59 * Macros are of the form:
60 * name1 = value1
61 *
62 * name2 = value2
63 */
57 static void parseMacros(Escape** pescapetable, Macro** pmacrotable, ubyte* m, uint mlen) 64 static void parseMacros(Escape** pescapetable, Macro** pmacrotable, ubyte* m, uint mlen)
58 { 65 {
59 assert(false); 66 assert(false);
60 } 67 }
61 68
69 /**************************************
70 * Parse escapes of the form:
71 * /c/string/
72 * where c is a single character.
73 * Multiple escapes can be separated
74 * by whitespace and/or commas.
75 */
62 static void parseEscapes(Escape** pescapetable, ubyte* textstart, uint textlen) 76 static void parseEscapes(Escape** pescapetable, ubyte* textstart, uint textlen)
63 { 77 {
64 assert(false); 78 assert(false);
65 } 79 }
66 /***************************************** 80 /*****************************************
68 * Update *pcomment to point past paragraph. 82 * Update *pcomment to point past paragraph.
69 * Returns null if no more paragraphs. 83 * Returns null if no more paragraphs.
70 * If paragraph ends in 'identifier:', 84 * If paragraph ends in 'identifier:',
71 * then (*pcomment)[0 .. idlen] is the identifier. 85 * then (*pcomment)[0 .. idlen] is the identifier.
72 */ 86 */
73 void parseSections(ubyte* comment) 87 void parseSections(string comment)
74 { 88 {
75 ubyte*p; 89 ubyte*p;
76 ubyte*pstart; 90 ubyte*pstart;
77 ubyte*pend; 91 ubyte*pend;
78 ubyte*idstart; 92 ubyte*idstart;