Method compile()
- Method
compile
program
compile(string
source
,CompilationHandler
|void
handler
,int
|void
major
,int
|void
minor
,program
|void
target
,object
|void
placeholder
)- Description
Compile a string to a program.
This function takes a piece of Pike code as a string and compiles it into a clonable program.
The optional argument
handler
is used to specify an alternative error handler. If it is not specified the current master object will be used.The optional arguments
major
andminor
are used to tell the compiler to attempt to be compatible with Pikemajor
.minor
.- Note
Note that
source
must contain the complete source for a program. It is not possible to compile a single expression or statement.Also note that compile() does not preprocess the program. To preprocess the program you can use compile_string() or call the preprocessor manually by calling cpp().
- See also
compile_string(), compile_file(), cpp(), master(), CompilationHandler, DefaultCompilerEnvironment