Mercurial > projects > dil
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/trunk/src/html_map.d Fri Feb 15 02:07:53 2008 +0100 @@ -0,0 +1,108 @@ +/// A map of document elements and D tokens to format strings. +string[string] map = [ + "DocHead" : `<html>`\n + `<head>`\n + ` <meta http-equiv="Content-Type" content="text/html; charset=utf-8">`\n + ` <link href="html.css" rel="stylesheet" type="text/css">`\n + `</head>`\n + `<body>`\n, + "DocEnd" : "\n</body>" + "\n</html>", + "SourceBegin" : `<pre class="sourcecode">`, + "SourceEnd" : "\n</pre>", + "CompBegin" : `<div class="compilerinfo">`\n, + "CompEnd" : "</div>\n", + "LexerError" : `<p class="error L">{0}({1},{2})L: {3}</p>`\n, + "ParserError" : `<p class="error P">{0}({1},{2})P: {3}</p>`\n, + + // Node categories: + "Declaration" : "d", + "Statement" : "s", + "Expression" : "e", + "Type" : "t", + "Other" : "o", + + // {0} = node category. + // {1} = node class name: "Call", "If", "Class" etc. + // E.g.: <span class="d Struct">...</d> + "NodeBegin" : `<span class="{0} {1}">`, + "NodeEnd" : `</span>`, + + "Identifier" : `<span class="i">{0}</span>`, + "String" : `<span class="sl">{0}</span>`, + "Char" : `<span class="cl">{0}</span>`, + "Number" : `<span class="n">{0}</span>`, + "Keyword" : `<span class="k">{0}</span>`, + + "LineC" : `<span class="lc">{0}</span>`, + "BlockC" : `<span class="bc">{0}</span>`, + "NestedC" : `<span class="nc">{0}</span>`, + + "Shebang" : `<span class="shebang">{0}</span>`, + "HLine" : `<span class="hl">{0}</span>`, // #line + "Filespec" : `<span class="fs">{0}</span>`, // #line N "filespec" + "Newline" : "{0}", // \n | \r | \r\n | LS | PS + "Illegal" : `<span class="ill">{0}</span>`, // A character not recognized by the lexer. + + "SpecialToken" : `<span class="st">{0}</span>`, // __FILE__, __LINE__ etc. + + "(" : "<br>(</br>", + ")" : "<br>)</br>", + "[" : "<br>[</br>", + "]" : "<br>]</br>", + "{" : "<br>{</br>", + "}" : "<br>}</br>", + "." : ".", + ".." : "..", + "..." : "...", + "!<>=" : "!<>=", // Unordered + "!<>" : "!<>", // UorE + "!<=" : "!<=", // UorG + "!<" : "!<", // UorGorE + "!>=" : "!>=", // UorL + "!>" : "!>", // UorLorE + "<>=" : "<>=", // LorEorG + "<>" : "<>", // LorG + "=" : "=", + "==" : "==", + "!" : "!", + "!=" : "!=", + "<=" : "<=", + "<" : "<", + ">=" : ">=", + ">" : ">", + "<<=" : "<<=", + "<<" : "<<", + ">>=" : ">>=", + ">>" : ">>", + ">>>=" : ">>>=", + ">>>" : ">>>", + "|" : "|", + "||" : "||", + "|=" : "|=", + "&" : "&", + "&&" : "&&", + "&=" : "&=", + "+" : "+", + "++" : "++", + "+=" : "+=", + "-" : "-", + "--" : "--", + "-=" : "-=", + "/" : "/", + "/=" : "/=", + "*" : "*", + "*=" : "*=", + "%" : "%", + "%=" : "%=", + "^" : "^", + "^=" : "^=", + "~" : "~", + "~=" : "~=", + ":" : ":", + ";" : ";", + "?" : "?", + "," : ",", + "$" : "$", + "EOF" : "" +];