1 parent cd35a73 commit 8a640eaCopy full SHA for 8a640ea
1 file changed
Code/FlagSystem/ScriptFlagHandler.cs
@@ -7,6 +7,7 @@
7
using SER.Code.ScriptSystem.Structures;
8
using SER.Code.TokenSystem.Structures;
9
using SER.Code.TokenSystem.Tokens;
10
+using SER.Code.TokenSystem.Tokens.ValueTokens;
11
12
namespace SER.Code.FlagSystem;
13
@@ -49,7 +50,10 @@ internal static TryGet<List<Flag>> PrepareScript(List<Line> scriptLinesWithFlags
49
50
return $"Line {line.LineNumber}: Name of the flag is missing.";
51
}
52
- var args = tokens.Skip(2).Select(t => t.BestStaticTextRepr()).ToArray();
53
+ // DurationValue.StringRep can contain spaces, so keep the parseable source token.
54
+ var args = tokens.Skip(2)
55
+ .Select(t => t is DurationToken ? t.RawRep : t.BestStaticTextRepr())
56
+ .ToArray();
57
var prefix = tokens.FirstOrDefault();
58
59
var result = prefix switch
0 commit comments