new-Series with tuple record def
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user