
class
docCompiler::SourceToHtmlGenerator
sys::Obj fandoc::HtmlDocWriter docCompiler::HtmlGenerator docCompiler::ApiToHtmlGenerator docCompiler::SourceToHtmlGenerator
SourceToHtmlGenerator generates an syntax color coded HTML file for a Type's source code.
Slots
- content
-
override Void content()
Generate the main content.
- convert
-
Void convert(Str[] lines, OutStream out)
Convert the Fan source code to syntax highlighted HTML markup.
-
private Void doBuf(Buf buf, OutStream out)
Handle writing the buf, checking for keywords. This method assumes the buf is still in write mode.
-
private Bool isAlphaNum(Int ch)
Return true if the buf contains only alphabetic characters, numerals or underscores.
-
Return true if this Str matches a keyword
- keywords
-
static Str:Bool keywords
- make
-
new make(DocCompiler compiler, Location loc, OutStream out, Type t, File srcFile)
-
private Bool markup(Str line, OutStream out, Bool inBlockComment := def)
Markup the given line with syntax highlighting.
-
private Void safe(OutStream out, Int ch)
Escape <, &, and > characters.
-
private Void safeStr(OutStream out, Str s)
Convenience for s.each |Int ch| { safe(out, ch) }
-
override Void sidebar()
Generate the sidebar.
- srcFile
-
File srcFile