1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

D-Binding: created small wrapper f. parse function

This commit is contained in:
Marenz 2011-05-15 20:47:54 +02:00
parent 5ef946fa3b
commit e30a555c2b

View file

@ -144,6 +144,24 @@ struct ParseState
return inst;
}
/**
* Parse PSYC packets.
*
* Generalized line-based packet parser.
*
* Params:
* oper = A reference to a character. In case of a variable, it will
* be set to the operator of that variable
* name = A reference to a String. It will point to the name of
* the variable or method and its length will be set accordingly
* value = A reference to a String. It will point to the
* value/body the variable/method and its length will be set accordingly
*/
ParseRC parse ( ref char oper, ref char[] name, ref char[] value )
{
return psyc_parse(this, &oper, cast(String*) &name, cast(String*) &value);
}
/**
* Change parse flags in state
*
@ -160,7 +178,7 @@ struct ParseState
if (flags & ParseFlag.START_AT_CONTENT)
this.part = Part.CONTENT;
else
this.part = 0;
this.part = Part.ROUTING;
}
/**
@ -304,6 +322,7 @@ struct ParseListState
}
}
private:
/**
* Parse PSYC packets.