Small helper function

This commit is contained in:
NeeEoo
2024-04-25 04:43:59 +02:00
parent b6df96a4b0
commit aaac98d7b0
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -2035,6 +2035,12 @@ class Parser {
return TConst( CString(b.toString()) );
}
function peekToken():Token {
var t = token();
push(t);
return t;
}
function token(/*?infos : Null<haxe.PosInfos>*/) {
//function ttrace(v:Dynamic, ?infos : Null<haxe.PosInfos>) {
// Sys.print(infos.fileName+":"+infos.lineNumber+": " + Std.string(v));
@@ -2042,6 +2048,7 @@ class Parser {
//}
#if hscriptPos
// Maybe have if( tokens.isEmpty() )
var t = tokens.pop();
if( t != null ) {
tokenMin = t.min;