Chris Lattner
1e517a78a8
replace form feeds with an <hr> tag.
...
llvm-svn: 49975
2008-04-19 23:56:30 +00:00
Ted Kremenek
a960be4bd4
Provide a version of html::HighlightMacros that takes a Preprocessor&.
...
llvm-svn: 49896
2008-04-18 05:34:33 +00:00
Chris Lattner
4bbd164a7a
Make tab insertion really right: the number of spaces inserted
...
depends on the column number of the start of the tab.
llvm-svn: 49891
2008-04-18 04:54:20 +00:00
Ted Kremenek
a3d02636ef
Use HTML5 doctype when generating HTML.
...
llvm-svn: 49888
2008-04-18 03:37:38 +00:00
Ted Kremenek
a821e087de
Updated CSS colors. Patch by Cedric Venet!
...
llvm-svn: 49886
2008-04-18 02:12:39 +00:00
Chris Lattner
54349c5f4d
Fix a problem noticed by Nuno, where we wouldn't escape characters in
...
macro expansions.
llvm-svn: 49877
2008-04-17 23:03:14 +00:00
Ted Kremenek
f42f3fb47d
class Preprocessor: Now owns the "predefines" char*; it deletes [] it in its dstor.
...
clang.cpp: InitializePreprocessor now makes a copy of the contents of PredefinesBuffer and
passes it to the preprocessor object.
clang.cpp: DriverPreprocessorFactory now calls "InitializePreprocessor" instead of this being done in main().
html::HighlightMacros() now takes a PreprocessorFactory, allowing it to conjure up a new
Preprocessor to highlight macros.
class HTMLDiagnostics now takes a PreprocessorFactory* that it can use for html::HighlightMacros().
Updated clients of HTMLDiagnostics to use this new interface.
llvm-svn: 49875
2008-04-17 22:31:54 +00:00
Chris Lattner
6929bd8047
don't give macros a background
...
llvm-svn: 49871
2008-04-17 21:32:46 +00:00
Chris Lattner
f219126107
Make sure popup is on top over other spans. wrap long line.
...
llvm-svn: 49870
2008-04-17 21:28:41 +00:00
Ted Kremenek
c2c08caf9c
Add support in HTML macro expansion for hovering over a macro and automatically
...
expanding its definition. This is a pure CSS solution.
Tested on IE7, Firefox 3b4, and Safari 3.1.
Patch by Cedric Venet!
llvm-svn: 49865
2008-04-17 19:57:27 +00:00
Chris Lattner
f1c70d79b8
insert macro expansions into floating divs. For now, they are always displayed,
...
but we want some javascript or something toggle their display.
llvm-svn: 49836
2008-04-17 00:40:45 +00:00
Chris Lattner
775fdd3618
correctly hilight multi-line macro definitions and other
...
preprocessor directives.
llvm-svn: 49828
2008-04-16 23:21:17 +00:00
Chris Lattner
10dbbb0c5a
Make HighlightRange correctly handle multi-line ranges. This causes us to
...
correctly handle multi-line comments.
llvm-svn: 49827
2008-04-16 23:06:45 +00:00
Chris Lattner
8e3006a4e3
add a new HighlightRange API, it doesn't handle multiline ranges
...
yet, but it will soon...
llvm-svn: 49825
2008-04-16 22:45:51 +00:00
Chris Lattner
e9786c3199
reenable highlighting of (the first line of) comments
...
llvm-svn: 49816
2008-04-16 20:54:51 +00:00
Chris Lattner
0bb0e7ee8a
switch from relexing with the preprocessor to do syntax highlighting to relexing
...
with the Lexer. This is cheaper and gives us some advantages. For now we start
highlighting preprocessor directives (which need improvement), and disable
comments. Comments to be restored later.
llvm-svn: 49815
2008-04-16 20:51:51 +00:00
Chris Lattner
03b8fcc247
Take a stab at highlighting #defines and #includes. This doesn't work yet.
...
llvm-svn: 49781
2008-04-16 06:53:09 +00:00
Chris Lattner
5e69a2dd9a
Syntax highlight keywords. I assume someone else will pick less appaling colors.
...
llvm-svn: 49780
2008-04-16 06:35:07 +00:00
Chris Lattner
a5a75e7a10
split syntax highlighting of macros from keywords and comments,
...
allowing us to use a cheaper means to highlight keywords and making
it so that comments won't foul up macro expansions.
Start highlighting macro expansions.
llvm-svn: 49779
2008-04-16 06:32:08 +00:00
Chris Lattner
060d8aa2ed
Add a mode of hackily syntax highlighting comments. This has a number of
...
problems, including the fact that it doesn't work well with multi-line
comments due to Ted's crazy table. However, that could be fixed, and it
does work with single-line ones :).
llvm-svn: 49778
2008-04-16 06:11:58 +00:00
Chris Lattner
c326f7e860
Switch AddLineNumbers to hack on a rewritebuffer instead of on a
...
rewriter, getting sourcelocations out of the picture.
llvm-svn: 49775
2008-04-16 04:37:29 +00:00
Chris Lattner
e7d696ec7f
In html::EscapeText, instead of going through the rewriter with
...
a SourceLocation to get a RewriteBuffer, poke the RewriteBuffer
with an offset directly. THis is no faster, but results in
cleaner code.
llvm-svn: 49774
2008-04-16 04:33:23 +00:00
Chris Lattner
05e5310ad8
switch AddLineNumber to use a SmallString instead of sstream. This
...
speeds up -emit-html on ted's testcase by 29% (.138 -> 0.107s) in a
release build.
llvm-svn: 49767
2008-04-16 04:11:35 +00:00
Ted Kremenek
7d6219f501
For HTML diagnostics, output more information about a bug report.
...
llvm-svn: 49742
2008-04-15 21:25:08 +00:00
Ted Kremenek
f17d5758fc
Micro-optimization: Don't use ostringstream when using a C-string literal
...
will work just fine.
llvm-svn: 49427
2008-04-09 15:40:40 +00:00
Ted Kremenek
5f7ece0bff
Don't expand tabs in EscapeText, but rather expand them when writing out
...
the HTML file. This should reduce the amount of memory pressure on the
rewriter for files that have a lot of tabs.
llvm-svn: 49406
2008-04-08 22:37:58 +00:00
Ted Kremenek
b1f773ca98
When substituting tabs during HTMLification, only add " " when we are
...
"escaping" spaces.
llvm-svn: 49404
2008-04-08 22:28:15 +00:00
Ted Kremenek
a9077ab6b7
Add ids for line numbers, allowing us to jump to arbitrary line numbers within
...
an HTMLified source file.
llvm-svn: 49359
2008-04-07 23:53:30 +00:00
Ted Kremenek
bd1bd88423
Tweak message bubble color (gold)
...
llvm-svn: 49357
2008-04-07 23:43:44 +00:00
Chris Lattner
e8e1e1131d
fix css font name, patch by Cédric Venet
...
llvm-svn: 49260
2008-04-06 04:37:21 +00:00
Ted Kremenek
c599179267
Some cleanups in EscapeText and AddLineNumbers. Still investigating performance
...
issues.
llvm-svn: 49150
2008-04-03 07:12:29 +00:00
Ted Kremenek
84041843af
CSS tweaking on blue boxes.
...
llvm-svn: 49121
2008-04-02 22:50:50 +00:00
Ted Kremenek
ab2a52c4bf
Blue diagnostic boxes.
...
llvm-svn: 49117
2008-04-02 21:14:04 +00:00
Ted Kremenek
258493c188
Added path sequence numbers in HTML output of PathDiagnostics.
...
llvm-svn: 49116
2008-04-02 21:04:20 +00:00
Ted Kremenek
3bcfc6edc0
Better handling for tabs with message bubbles.
...
llvm-svn: 49001
2008-03-31 23:14:05 +00:00
Ted Kremenek
64b95a024e
Minor CSS tweaking (smaller h1 tags).
...
Bug fix in EscapeText (for std::string) where spaces were not properly emitted.
llvm-svn: 48889
2008-03-27 17:28:58 +00:00
Ted Kremenek
561dfe3153
Add html::EscapeText for std::string; use this function to escape text in message bubbles.
...
llvm-svn: 48884
2008-03-27 17:15:29 +00:00
Ted Kremenek
8cc4842a76
Added <h3> tag in HTML file output that contains the name of the source file.
...
llvm-svn: 48869
2008-03-27 07:35:49 +00:00
Ted Kremenek
b2f4d3138f
Minor CSS tweaking: use webkit style CSS properties for shadows/rounded edges
...
for message bubbles.
llvm-svn: 48754
2008-03-24 23:38:32 +00:00
Ted Kremenek
bc24962566
Added HTML highlighting for ranges.
...
llvm-svn: 48572
2008-03-19 23:55:53 +00:00
Ted Kremenek
161d16e083
Change colors of HTML message bubble.
...
llvm-svn: 48563
2008-03-19 22:44:21 +00:00
Ted Kremenek
7ee6a1474f
More CSS enhancements to HTML code printing.
...
llvm-svn: 48557
2008-03-19 22:06:25 +00:00
Ted Kremenek
1651b7cd2d
Misc. cleanups to HTML printing: make code rendered using tables; add
...
better div positioning for messages.
llvm-svn: 48555
2008-03-19 21:59:05 +00:00
Ted Kremenek
216624ce58
Initial experimentation with adding boxed "annotations" to HTMLized source.
...
llvm-svn: 48540
2008-03-19 07:53:42 +00:00
Ted Kremenek
966da4acc3
Moved generation of html header/footer with builtin CSS to the rewriter library.
...
llvm-svn: 48537
2008-03-19 06:14:37 +00:00
Ted Kremenek
3f8392626b
More cleanups to the HTML rewriter (with line formatting), with better
...
pretty-printing of line numbers.
llvm-svn: 48533
2008-03-19 05:07:26 +00:00
Ted Kremenek
54d62b6d64
Change "style" to "class" in HTML output.
...
llvm-svn: 48525
2008-03-19 01:44:27 +00:00
Ted Kremenek
5ddff02861
More cleanups to HTML rewriter API: remove the InsertTag method; was too complicated
...
and clients can achieve a cleaner design just by inserting tags directly. Reserve
the "html" namespace for meta-level operations (e.g., escaping text, etc.)
llvm-svn: 48524
2008-03-19 01:30:02 +00:00
Ted Kremenek
8800ae68a0
More HTML rewriter cleanups. Preliminary CSS support in code pretty-printing.
...
llvm-svn: 48518
2008-03-18 23:55:46 +00:00
Ted Kremenek
5792cebb08
Some cleanups to the HTMLRewrite API. Added support for printing out line
...
numbers (more work to be done on aesthetics).
llvm-svn: 48512
2008-03-18 23:08:51 +00:00