fb-doc  0.4.0
FreeBASIC documentation tool
fbdoc_emit_syntax.bi File Reference

Declarations for syntax highlighting emitter. More...

#include "fbdoc_parser.bi"
#include "fbdoc_version.bi"
Include dependency graph for fbdoc_emit_syntax.bi:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RepData
 A container for string replacements. More...
 
class  Highlighter
 Class to process the syntax highlighting. More...
 
union  Highlighter.__unnamed__
 All flags for output formats in a UNION. More...
 
class  Highlighter.__unnamed__.__unnamed__
 Individual flags for a single output format. More...
 

Functions

FUNCTION_AS_STRING html_eol (BYVAL_AS_RepData_PTR, BYREF_AS_INTEGER)
 Generate end of line code for HTML output. More...
 
FUNCTION_AS_STRING html_specials (BYVAL_AS_UBYTE_PTR, BYVAL_AS_INTEGER, BYVAL_AS_INTEGER)
 Replace special characters for HTML output. More...
 

Detailed Description

Declarations for syntax highlighting emitter.

This file contains the declaration code for the "SyntaxHighLighting" emitter, namely the classes RepData and Highlighter.

Definition in file fbdoc_emit_syntax.bi.


Class Documentation

union Highlighter.__unnamed__

All flags for output formats in a UNION.

Definition at line 82 of file fbdoc_emit_syntax.bi.

Class Members
__unnamed__ __unnamed__ Individual flags for a single output format.
LONG GenAny Summary of all output flags.
class Highlighter.__unnamed__.__unnamed__

Individual flags for a single output format.

Definition at line 84 of file fbdoc_emit_syntax.bi.

Class Members
UBYTE GenHtm Flag for html output.
UBYTE GenTex Flag for LaTeX output.
UBYTE GenXml Flag for XML output.

Function Documentation

FUNCTION_AS_STRING html_eol ( BYVAL_AS_RepData_PTR  Symb,
BYREF_AS_INTEGER  Nr 
)

Generate end of line code for HTML output.

Parameters
SymbSymbol table for cross-referencing
NrLine number
Returns
A string to end the current line and start a new one

The function is used as Highlighter::eol() function. It generates code to end the current line and start a new one with the next line number. The number counter gets increased and returned as a BYREF parameter. Special line numbers are

  • 1: the first line (emit no line end but the line start)
  • 0: the last line (emit the line end but no line start)

Definition at line 167 of file fbdoc_emit_syntax.bas.

Here is the caller graph for this function:

FUNCTION_AS_STRING html_specials ( BYVAL_AS_UBYTE_PTR  T,
BYVAL_AS_INTEGER  A,
BYVAL_AS_INTEGER  L 
)

Replace special characters for HTML output.

Parameters
TThe Buffer to read from
AStart position (zero based)
LLength of substring
Returns
A string with replaced special characters

The function is used as Highlighter::special_chars() function. It extracts a substring from the input buffer. Special characters are replaced by their HTML equivalents.

Definition at line 81 of file fbdoc_emit_syntax.bas.

Here is the caller graph for this function: