new-Series with tuple record def

This commit is contained in:
Michael Schimmel
2026-01-06 13:38:06 +01:00
parent fb2fc8f6f9
commit 3b3966b2f7
13 changed files with 729 additions and 1131 deletions
+5 -4
View File
@@ -612,10 +612,11 @@ begin
end
else if SameText(head.Token.Text, 'new-series') then
begin
if (tailNodes[0].Kind = akConstant) and (tailNodes[0].AsConstant.Value.Kind = vkText) then
Result := TAst.CreateSeries(tailNodes[0].AsConstant.Value.AsText, startLoc)
else
Error('Syntax Error: ''new-series'' argument must be a string literal.');
if Length(tailNodes) <> 1 then
Error('Syntax Error: ''new-series'' requires exactly one argument (the definition vector).');
// UPDATED: Accept any node (usually a vector) as definition
Result := TAst.CreateSeries(tailNodes[0], startLoc);
end
else if SameText(head.Token.Text, 'add-item') then
begin