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

Header file for the Parser class. More...

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

Go to the source code of this file.

Classes

class  Parser
 The parser. More...
 

Macros

#define Code(_T_)   /* P->writeOut(_T_) */
 Convenience macro for output (plugins) (fb-doc intern) More...
 
#define SCAN_QUOTE(Buf, Po)
 Find the end of a Quote. More...
 
#define SCAN_SL_COMM(Buf, Po)
 Find the end of a line end comment. More...
 

Variables

*typedef ParserParser_PTR
 Doxygen internal (ignore this). More...
 

Detailed Description

Header file for the Parser class.

This file contains the declaration of the Parser, a class for loading and scanning FB source code. It calls the matching functions in the EmitterIF.

Definition in file fbdoc_parser.bi.

Macro Definition Documentation

#define Code (   _T_)    /* P->writeOut(_T_) */

Convenience macro for output (plugins) (fb-doc intern)

Definition at line 14 of file fbdoc_parser.bi.

#define SCAN_QUOTE (   Buf,
  Po 
)
Value:
/* (multi line FreeBASIC #MACRO)
VAR esc = IIF(Po, IIF(Buf[Po - 1] = ASC("!"), 1, 0), 0)
DO
Po += 1
SELECT CASE AS CONST Buf[Po]
CASE 0, ASC(!"\n") : Po -= 1 : EXIT DO
CASE ASC("\") : IF esc THEN Po += 1
CASE ASC("""") : IF Buf[Po + 1] = ASC("""") THEN Po += 1 ELSE EXIT DO
END SELECT
LOOP
#ENDMACRO */

Find the end of a Quote.

This snippet is used to find the end of a quoted string. It checks if the string uses escape sequences and evaluates '\"' . It stops at the last double quote (if Buf[Po] isn't ASC(!"\"") then the end of the buffer is reached).

Definition at line 351 of file fbdoc_parser.bi.

#define SCAN_SL_COMM (   Buf,
  Po 
)
Value:
/* (multi line FreeBASIC #MACRO)
DO
Po += 1
SELECT CASE AS CONST Buf[Po]
CASE 0, ASC(!"\n") : EXIT DO
END SELECT
LOOP
#ENDMACRO */

Find the end of a line end comment.

This snippet is used to find the end of a line end comment. It checks for a ASC(!"\\n") and evaluates line concatenations ( _ ) on the way. It stops at the line end (if Buf[Po] isn't ASC(!"\\n") then the end of the buffer is reached).

Definition at line 372 of file fbdoc_parser.bi.

Variable Documentation

* typedef Parser* Parser_PTR

Doxygen internal (ignore this).

Definition at line 23 of file fbdoc_parser.bi.