mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
added function setParseFlags
This commit is contained in:
parent
ec23faa4ae
commit
51b3dc3a66
2 changed files with 38 additions and 2 deletions
|
@ -133,17 +133,34 @@ struct ParseState
|
|||
* Params:
|
||||
* flags = Flags to be set for the parser, see ParseFlag.
|
||||
*/
|
||||
static ParseState opCall ( ubyte flags )
|
||||
static ParseState opCall ( ParseFlag flags )
|
||||
{
|
||||
ParseState inst;
|
||||
inst.flags = flags;
|
||||
|
||||
if (flags & ParseFlag.ROUTING_ONLY)
|
||||
if (flags & ParseFlag.START_AT_CONTENT)
|
||||
inst.part = Part.CONTENT;
|
||||
|
||||
return inst;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change parse flags in state
|
||||
*
|
||||
* Params:
|
||||
* state = Pointer to the state struct that should be initialized.
|
||||
* flags = Flags to be set for the parser, see psycParseFlag.
|
||||
*
|
||||
* See_Also: psyc_initParseState psycParseFlag
|
||||
*/
|
||||
void setParseFlags (ParseFlag flags)
|
||||
{
|
||||
this.flags = flags;
|
||||
|
||||
if (flags & ParseFlag.START_AT_CONTENT)
|
||||
this.part = Part.CONTENT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new buffer in the parser state struct with data to be parsed.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue