annotate trunk/src/format.css @ 322:ed4ef0173793

- Moved out large TOK switch case to function printToken(). - Renamed tokensToXML() to tokensToDoc() and added parameter 'options'. - Not using string literals anymore to print XML tags. Created an enum and two tables, for XML and HTML, with entries for every tag that needs to be printed. - Added function getShortClassName() which returns the short class name of a class that inherits from Node. - Added new styles to and changed some in format.css.
author aziz
date Mon, 20 Aug 2007 19:59:04 +0000
parents 29c33ce6c5bb
children 39f93a4ec416
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
44
5055947e0f98 - Specific operators and comments can be formatted with CSS now.
aziz
parents: 33
diff changeset
1 @charset "utf-8";
322
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
2 compilerinfo, sourcecode {
6
9980a2a34236 - Added style sheet.
aziz
parents:
diff changeset
3 display: block;
9980a2a34236 - Added style sheet.
aziz
parents:
diff changeset
4 white-space: pre;
9980a2a34236 - Added style sheet.
aziz
parents:
diff changeset
5 font-family: Monospace;
9980a2a34236 - Added style sheet.
aziz
parents:
diff changeset
6 font-size: 0.8em;
9980a2a34236 - Added style sheet.
aziz
parents:
diff changeset
7 }
52
f65a83c27638 - Fixed the raw string literal scanner. Newlines weren't copied to the buffer. Converting LS and PS to '\n' as well.
aziz
parents: 51
diff changeset
8 compilerinfo {
f65a83c27638 - Fixed the raw string literal scanner. Newlines weren't copied to the buffer. Converting LS and PS to '\n' as well.
aziz
parents: 51
diff changeset
9 white-space: normal;
f65a83c27638 - Fixed the raw string literal scanner. Newlines weren't copied to the buffer. Converting LS and PS to '\n' as well.
aziz
parents: 51
diff changeset
10 border: 1px solid #A22;
f65a83c27638 - Fixed the raw string literal scanner. Newlines weren't copied to the buffer. Converting LS and PS to '\n' as well.
aziz
parents: 51
diff changeset
11 padding: 0.5em;
f65a83c27638 - Fixed the raw string literal scanner. Newlines weren't copied to the buffer. Converting LS and PS to '\n' as well.
aziz
parents: 51
diff changeset
12 margin: 1em;
f65a83c27638 - Fixed the raw string literal scanner. Newlines weren't copied to the buffer. Converting LS and PS to '\n' as well.
aziz
parents: 51
diff changeset
13 }
51
cadd2bfe686c - Displaying error messages in XML.
aziz
parents: 44
diff changeset
14 compilerinfo error { display: block; }
312
fa0b6f32c1ae - Added Special to enum TOK.
aziz
parents: 306
diff changeset
15 /* Number */
58
50bb7fc9db44 - The types of integers are recognized now.
aziz
parents: 52
diff changeset
16 n { color: teal; }
312
fa0b6f32c1ae - Added Special to enum TOK.
aziz
parents: 306
diff changeset
17 /* Keyword */
28
3a9daccf7d96 - Added table for identifiers to Lexer.
aziz
parents: 14
diff changeset
18 k { color: darkblue; font-weight: bold; }
312
fa0b6f32c1ae - Added Special to enum TOK.
aziz
parents: 306
diff changeset
19 /* Line and block comments */
322
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
20 c[t=l], c[t=b] { color: green; }
312
fa0b6f32c1ae - Added Special to enum TOK.
aziz
parents: 306
diff changeset
21 /* Nested comments */
322
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
22 c[t=n] { color: darkgreen; }
312
fa0b6f32c1ae - Added Special to enum TOK.
aziz
parents: 306
diff changeset
23 /* Identifier */
44
5055947e0f98 - Specific operators and comments can be formatted with CSS now.
aziz
parents: 33
diff changeset
24 i { color: black; }
312
fa0b6f32c1ae - Added Special to enum TOK.
aziz
parents: 306
diff changeset
25 /* String literal */
9
5d6968cc751e - Parsing string and character literals now (rudimentary implementation.)
aziz
parents: 6
diff changeset
26 sl { color: red; }
312
fa0b6f32c1ae - Added Special to enum TOK.
aziz
parents: 306
diff changeset
27 /* Character literal */
14
cdf788d8bdaf - Parsing /= now.
aziz
parents: 9
diff changeset
28 cl { color: purple; }
312
fa0b6f32c1ae - Added Special to enum TOK.
aziz
parents: 306
diff changeset
29 /* Operator */
33
cf3047cf3cd2 - Added code for parsing back quote and raw strings.
aziz
parents: 28
diff changeset
30 op { color: royalblue; }
312
fa0b6f32c1ae - Added Special to enum TOK.
aziz
parents: 306
diff changeset
31 /* All bracket types */
28
3a9daccf7d96 - Added table for identifiers to Lexer.
aziz
parents: 14
diff changeset
32 br { color: orange; }
312
fa0b6f32c1ae - Added Special to enum TOK.
aziz
parents: 306
diff changeset
33 /* Special tokens */
fa0b6f32c1ae - Added Special to enum TOK.
aziz
parents: 306
diff changeset
34 st { color: green; font-weight: bold; }
315
29c33ce6c5bb - Added method scanShebang to class Lexer.
aziz
parents: 312
diff changeset
35 /* When the first line starts with #! it's a "shebang" */
29c33ce6c5bb - Added method scanShebang to class Lexer.
aziz
parents: 312
diff changeset
36 shebang { color: gray; }
312
fa0b6f32c1ae - Added Special to enum TOK.
aziz
parents: 306
diff changeset
37 /* Particular operators */
322
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
38 op[t=aa] { content: "and"; } /*&& ∧*/
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
39 op[t=oo] { content: "or"; } /*|| ∨*/
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
40 op[t=n] { content: "¬"; } /*!*/
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
41 op[t=ne] { content: "≠"; } /*!=*/
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
42 op[t=le] { content: "≤"; } /*<=*/
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
43 op[t=ge] { content: "≥"; } /*>=*/
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
44 op[t=lg] { content: "≶"; } /*<>*/
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
45
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
46 /*
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
47 d = Declaration
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
48 s = Statement
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
49 e = Expression
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
50 t = Type
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
51 o = Other
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
52 */
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
53 /* d { background-color: #FFDDDD; } */
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
54 /* e { background-color: #DDDDFF;} */
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
55 d[t=Module] i, d[t=Import] i { color: blue; }
ed4ef0173793 - Moved out large TOK switch case to function printToken().
aziz
parents: 315
diff changeset
56 t i { color: #119; }