summaryrefslogtreecommitdiff
path: root/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'source/core')
-rw-r--r--source/core/slang-token-reader.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/core/slang-token-reader.h b/source/core/slang-token-reader.h
index 264693c81..c4b552d29 100644
--- a/source/core/slang-token-reader.h
+++ b/source/core/slang-token-reader.h
@@ -262,6 +262,15 @@ namespace Misc {
}
return false;
}
+ bool AdvanceIf(TokenType token)
+ {
+ if( LookAhead(token) )
+ {
+ ReadToken();
+ return true;
+ }
+ return false;
+ }
bool IsEnd()
{
return tokenPtr == (int)tokens.getCount();