mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
Add a function for retreiving the parsed token.
Saves having to reach into the token's dstring (script->token->str was getting annoying).
This commit is contained in:
parent
ac88c86dd3
commit
43a9232787
2 changed files with 11 additions and 0 deletions
|
@ -88,6 +88,11 @@ qboolean Script_GetToken (script_t *script, qboolean crossline);
|
|||
*/
|
||||
void Script_UngetToken (script_t *script);
|
||||
|
||||
/** Return a pointer to the current token.
|
||||
\param script The script_t object being parsed
|
||||
*/
|
||||
const char *Script_Token (script_t *token);
|
||||
|
||||
//@}
|
||||
|
||||
#endif//__QF_script_h
|
||||
|
|
|
@ -178,3 +178,9 @@ Script_UngetToken (script_t *script)
|
|||
{
|
||||
script->unget = true;
|
||||
}
|
||||
|
||||
VISIBLE const char *
|
||||
Script_Token (script_t *script)
|
||||
{
|
||||
return script->token->str;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue