Tok = Ziron_GetNextToken();
.....
.....
if ( (Tok == zirDirective) or (Tok == zirHash) ) // so we found '#'
{
nxTok = Ziron_PeekNextToken();
if( (nxTok == zirDirective) or (nxTok == zirHash)) check for another '#'
{
but it seem's Ziron_PeekNextToken updates internal zrion state, so that Ziron_GetStringValue brings next Token in program and it should brings the one that belong to Tok.
To do this i will need to add a seperate buffer for current/peeked token strings, however since alot of plugins will not require this, it may be best for you to allocate your own buffer for token strings before calling peeknexttoken.
you could use something like this:
/////////////
const maxTokenLength = 256; //i will add this to framework.zir and will update it accordingly at later releases.
inline function Ziron_GetNextTokenEx() {
global char tokString[maxTokenLength];
eax = Ziron_GetNextToken();
push eax
eax = Ziron_GetStringValue();
strcpy(@tokString, eax);
pop eax
$return eax;
}
inline function Ziron_GetStringValueEx() {
$return @tokString;
}
//////
Tok = Ziron_GetNextTokenEx();
.....
.....
if ( (Tok == zirDirective) or (Tok == zirHash) ) // so we found '#'
{
nxTok = Ziron_PeekNextToken();
if( (nxTok == zirDirective) or (nxTok == zirHash)) check for another '#'
{