Module preprocessor

Source
Expand description

The preprocessor is the first step in the compilation process. It is responsible for removing comments and expanding macros and directives.

It exposes three functions: preprocess_code, preprocess_codes and preprocess_variables

Enums§

PPVar
A preprocessor variable or macro.

Functions§

preprocess_code
Preprocesses code and gives back the a list of preprocessed code blocks and the variable
preprocess_codes
Preprocesses the list code segments, expands the variables and returns the final code. Take a stacklevel, a list of code segments, the variables, and a filename.
preprocess_variables
Expand the variables in a Code Takes a stacklevel, a code segment, the variables, and a filename.
read_file
Reads a file and gives back the a list of preprocessed code blocks and the variables

Type Aliases§

PPCode
A list of code segments and its size.
PPVars
A HashMap of preprocessor variables.