Mercurial > projects > dil
comparison trunk/src/html_map.d @ 759:9c47f377ca0b
Revised module cmd.Generate.
Added class TagMapLoader.
Fixed StringExpression.getString() and related code in the Parser.
Added options 'xml_map' and 'html_map' to config.d
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Fri, 15 Feb 2008 02:07:53 +0100 |
parents | |
children | ea9e8b141742 |
comparison
equal
deleted
inserted
replaced
758:f4b9680c0e16 | 759:9c47f377ca0b |
---|---|
1 /// A map of document elements and D tokens to format strings. | |
2 string[string] map = [ | |
3 "DocHead" : `<html>`\n | |
4 `<head>`\n | |
5 ` <meta http-equiv="Content-Type" content="text/html; charset=utf-8">`\n | |
6 ` <link href="html.css" rel="stylesheet" type="text/css">`\n | |
7 `</head>`\n | |
8 `<body>`\n, | |
9 "DocEnd" : "\n</body>" | |
10 "\n</html>", | |
11 "SourceBegin" : `<pre class="sourcecode">`, | |
12 "SourceEnd" : "\n</pre>", | |
13 "CompBegin" : `<div class="compilerinfo">`\n, | |
14 "CompEnd" : "</div>\n", | |
15 "LexerError" : `<p class="error L">{0}({1},{2})L: {3}</p>`\n, | |
16 "ParserError" : `<p class="error P">{0}({1},{2})P: {3}</p>`\n, | |
17 | |
18 // Node categories: | |
19 "Declaration" : "d", | |
20 "Statement" : "s", | |
21 "Expression" : "e", | |
22 "Type" : "t", | |
23 "Other" : "o", | |
24 | |
25 // {0} = node category. | |
26 // {1} = node class name: "Call", "If", "Class" etc. | |
27 // E.g.: <span class="d Struct">...</d> | |
28 "NodeBegin" : `<span class="{0} {1}">`, | |
29 "NodeEnd" : `</span>`, | |
30 | |
31 "Identifier" : `<span class="i">{0}</span>`, | |
32 "String" : `<span class="sl">{0}</span>`, | |
33 "Char" : `<span class="cl">{0}</span>`, | |
34 "Number" : `<span class="n">{0}</span>`, | |
35 "Keyword" : `<span class="k">{0}</span>`, | |
36 | |
37 "LineC" : `<span class="lc">{0}</span>`, | |
38 "BlockC" : `<span class="bc">{0}</span>`, | |
39 "NestedC" : `<span class="nc">{0}</span>`, | |
40 | |
41 "Shebang" : `<span class="shebang">{0}</span>`, | |
42 "HLine" : `<span class="hl">{0}</span>`, // #line | |
43 "Filespec" : `<span class="fs">{0}</span>`, // #line N "filespec" | |
44 "Newline" : "{0}", // \n | \r | \r\n | LS | PS | |
45 "Illegal" : `<span class="ill">{0}</span>`, // A character not recognized by the lexer. | |
46 | |
47 "SpecialToken" : `<span class="st">{0}</span>`, // __FILE__, __LINE__ etc. | |
48 | |
49 "(" : "<br>(</br>", | |
50 ")" : "<br>)</br>", | |
51 "[" : "<br>[</br>", | |
52 "]" : "<br>]</br>", | |
53 "{" : "<br>{</br>", | |
54 "}" : "<br>}</br>", | |
55 "." : ".", | |
56 ".." : "..", | |
57 "..." : "...", | |
58 "!<>=" : "!<>=", // Unordered | |
59 "!<>" : "!<>", // UorE | |
60 "!<=" : "!<=", // UorG | |
61 "!<" : "!<", // UorGorE | |
62 "!>=" : "!>=", // UorL | |
63 "!>" : "!>", // UorLorE | |
64 "<>=" : "<>=", // LorEorG | |
65 "<>" : "<>", // LorG | |
66 "=" : "=", | |
67 "==" : "==", | |
68 "!" : "!", | |
69 "!=" : "!=", | |
70 "<=" : "<=", | |
71 "<" : "<", | |
72 ">=" : ">=", | |
73 ">" : ">", | |
74 "<<=" : "<<=", | |
75 "<<" : "<<", | |
76 ">>=" : ">>=", | |
77 ">>" : ">>", | |
78 ">>>=" : ">>>=", | |
79 ">>>" : ">>>", | |
80 "|" : "|", | |
81 "||" : "||", | |
82 "|=" : "|=", | |
83 "&" : "&", | |
84 "&&" : "&&", | |
85 "&=" : "&=", | |
86 "+" : "+", | |
87 "++" : "++", | |
88 "+=" : "+=", | |
89 "-" : "-", | |
90 "--" : "--", | |
91 "-=" : "-=", | |
92 "/" : "/", | |
93 "/=" : "/=", | |
94 "*" : "*", | |
95 "*=" : "*=", | |
96 "%" : "%", | |
97 "%=" : "%=", | |
98 "^" : "^", | |
99 "^=" : "^=", | |
100 "~" : "~", | |
101 "~=" : "~=", | |
102 ":" : ":", | |
103 ";" : ";", | |
104 "?" : "?", | |
105 "," : ",", | |
106 "$" : "$", | |
107 "EOF" : "" | |
108 ]; |