Skip to content

Commit 9357eef

Browse files
author
leinlin
committed
parse的准确性
1 parent 0e1e70d commit 9357eef

File tree

4 files changed

+3
-56
lines changed

4 files changed

+3
-56
lines changed

LuaProfiler/Exsample/Assets/LuaProfiler.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LuaProfiler/Exsample/Assets/LuaProfiler/Core/Driver/Parse/Parse.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,7 @@ static void InsertSample(LLex l, ref int lastPos, ref int nextPos, int tokenType
177177
}
178178
break;
179179
case (int)TK.IF:
180-
case (int)TK.FOR:
181-
case (int)TK.WHILE:
180+
case (int)TK.DO:
182181
if (tokens.Count > 0)
183182
{
184183
tokens.Push(tokenType);
@@ -270,8 +269,7 @@ static void InsertSample(LLex l, ref int lastPos, ref int nextPos, int tokenType
270269
}
271270
if (tokens.Count > 0)
272271
{
273-
var tA = tokens.ToArray();
274-
lastStackToken = tA[tA.Length - 1];
272+
lastStackToken = tokens.Peek();
275273
}
276274
hasReturn = false;
277275
}
Binary file not shown.

LuaProfiler/Exsample/Logs/Packages-Update.log

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)