mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Fixed an issue with the Runner not showing the correct label of the block being processed.
This commit is contained in:
@@ -75,6 +75,27 @@ namespace RuriLib.LS
|
||||
/// <summary>The current line being processed.</summary>
|
||||
public string CurrentLine { get; set; } = "";
|
||||
|
||||
/// <summary>The next block to be processed. Empty if the script has no more blocks to execute.</summary>
|
||||
public string NextBlock
|
||||
{
|
||||
get
|
||||
{
|
||||
for (int j = i; j < lines.Count(); j++)
|
||||
{
|
||||
var line = lines[j];
|
||||
if (IsEmptyOrCommentOrDisabled(line) || !BlockParser.IsBlock(line)) continue;
|
||||
|
||||
var label = "";
|
||||
if (lines[j].StartsWith("#")) label = LineParser.ParseLabel(ref line);
|
||||
var blockName = LineParser.ParseToken(ref line, TokenType.Parameter, false, false);
|
||||
|
||||
if (label != "") return $"{blockName} ({label})";
|
||||
else return blockName;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The current block being processed.</summary>
|
||||
public string CurrentBlock { get; set; } = "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user