parseModule

parseModule
(
const(Token)[] tokens
,
string fileName
,
IAllocator allocator = null
,
void function
(
string
,
size_t
,
size_t
,
string
,
bool
)
messageFunction = null
,
uint* errorCount = null
,
uint* warningCount = null
)

Parameters

tokens const(Token)[]

the tokens parsed by dparse.lexer

fileName string

the name of the file being parsed

messageFunction void function
(
string
,
size_t
,
size_t
,
string
,
bool
)

a function to call on error or warning messages. The parameters are the file name, line number, column number, the error or warning message, and a boolean (true means error, false means warning).

Return Value

Type: Module

the parsed module

Meta