summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-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 0c2d390d2..f08c1674c 100644
--- a/source/core/slang-token-reader.h
+++ b/source/core/slang-token-reader.h
@@ -231,6 +231,15 @@ namespace Slang
return false;
}
}
+ bool AdvanceIf(String token)
+ {
+ if( LookAhead(token) )
+ {
+ ReadToken();
+ return true;
+ }
+ return false;
+ }
bool IsEnd()
{
return tokenPtr == (int)tokens.getCount();