Refactoring Keyword mapping, introducing tuples

This commit is contained in:
Michael Schimmel
2026-01-04 15:07:02 +01:00
parent f1733c41a0
commit 0a7a6ea2d0
13 changed files with 245 additions and 93 deletions
+1 -1
View File
@@ -315,7 +315,7 @@ begin
idx := genRec.IndexOf(Myc.Data.Keyword.TKeywordRegistry.Intern('Add'));
Assert.IsTrue(idx >= 0, 'Method Add should exist in type definition');
methodType := genRec.Items[idx].Value;
methodType := genRec.Items[idx];
Assert.AreEqual(TStaticTypeKind.stMethod, methodType.Kind);
// Add has 2 args (Ordinal, Ordinal) -> Ordinal
Assert.AreEqual(Int64(2), Length(methodType.Signatures[0].ParamTypes));
+1 -1
View File
@@ -133,7 +133,7 @@ begin
SetLength(RowData, Def.Count);
for i := 0 to Def.Count - 1 do
begin
Key := Def.Items[i].Key;
Key := Def.Keywords[i];
if Key = kTime then
RowData[i] := FLastTime
else if Key = kOpen then
+2 -1
View File
@@ -37,7 +37,8 @@ uses
Test.Myc.Ast.NullPropagation in 'AST\Test.Myc.Ast.NullPropagation.pas',
Test.Myc.Ast.Pipes in 'AST\Test.Myc.Ast.Pipes.pas',
Test.Myc.Ast.Integration in 'Test.Myc.Ast.Integration.pas',
Demo.Finance in 'Demo.Finance.pas';
Demo.Finance in 'Demo.Finance.pas',
Myc.Data.Tuple in '..\Src\Data\Myc.Data.Tuple.pas';
{ keep comment here to protect the following conditional from being removed by the IDE when adding a unit }
{$IFNDEF TESTINSIGHT}
+1
View File
@@ -139,6 +139,7 @@ $(PreBuildEvent)]]></PreBuildEvent>
<DCCReference Include="AST\Test.Myc.Ast.Pipes.pas"/>
<DCCReference Include="Test.Myc.Ast.Integration.pas"/>
<DCCReference Include="Demo.Finance.pas"/>
<DCCReference Include="..\Src\Data\Myc.Data.Tuple.pas"/>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>