Class CompilerEnvironment()->CPP
- Description
The state for an instance of the preprocessor.
- See also
- Variable
handler
Variable compat_handler
CompilationHandler
CompilerEnvironment.CPP.handler
CompilationHandler
CompilerEnvironment.CPP.compat_handler
- Method
create
CompilerEnvironment.CPP CompilerEnvironment.CPP(
string
|void
current_file
,int
|string
|void
charset
,object
|void
handler
,void
|int
compat_major
,void
|int
compat_minor
,void
|int
picky_cpp
)
CompilerEnvironment.CPP CompilerEnvironment.CPP(
mapping
(string
:mixed
)options
)- Description
Initialize the preprocessor.
- Parameter
options
If the first argument is a mapping, no other arguments may follow. Instead, they have to be given as members of the mapping (if wanted). The following members are then recognized:
"current_file"
:string
Name of the current file. It is used for generating #line directives and for locating include files.
"charset"
:int
|string
Charset to use when processing
data
."handler"
:object
Compilation handler.
"compat_major"
:int
Sets the major pike version used for compat handling.
"compat_minor"
:int
Sets the minor pike version used for compat handling.
"picky_cpp"
:int
Generate more warnings.
"keep_comments"
:int
This option keeps cpp() from removing comments. Useful in combination with the prefix feature below.
"prefix"
:string
If a prefix is given, only prefixed directives will be processed. For example, if the prefix is
"foo"
, then#foo_ifdef COND
andfoo___LINE__
would be processed,#ifdef COND
and__LINE__
would not."predefines"
:mapping
(string
:mixed
)Mapping of predefined macros in addition to those returned by CPP()->get_predefines().
- Parameter
current_file
If the current_file argument has not been specified, it will default to
"-"
.- Parameter
charset
Turn on automatic character set detection if
1
, otherwise specifies the character set used by the input. Defaults to"ISO-10646"
.- See also