diff --git a/ASTPlayground/ASTPlayground.dproj b/ASTPlayground/ASTPlayground.dproj
index b988ee1..4b373f7 100644
--- a/ASTPlayground/ASTPlayground.dproj
+++ b/ASTPlayground/ASTPlayground.dproj
@@ -4,7 +4,7 @@
20.3
FMX
True
- Release
+ Debug
Win64
ASTPlayground
2
diff --git a/Src/AST/Myc.Ast.Debugger.pas b/Src/AST/Myc.Ast.Debugger.pas
index d31e7a3..7d9fc53 100644
--- a/Src/AST/Myc.Ast.Debugger.pas
+++ b/Src/AST/Myc.Ast.Debugger.pas
@@ -6,6 +6,7 @@ uses
System.SysUtils,
System.Classes,
System.Generics.Collections,
+ Myc.Data.Scalar,
Myc.Data.Value,
Myc.Ast.Nodes,
Myc.Ast.Scope,
diff --git a/Src/AST/Myc.Ast.Nodes.pas b/Src/AST/Myc.Ast.Nodes.pas
index b8bdb3f..fa4a7b0 100644
--- a/Src/AST/Myc.Ast.Nodes.pas
+++ b/Src/AST/Myc.Ast.Nodes.pas
@@ -9,14 +9,6 @@ uses
Myc.Data.Value;
type
- TBinaryOperatorHelper = record helper for TBinaryOperator
- function ToString: string;
- end;
-
- TUnaryOperatorHelper = record helper for TUnaryOperator
- function ToString: string;
- end;
-
// --- Forward Declarations to break cycles ---
IAstVisitor = interface;
IAstNode = interface;
@@ -284,36 +276,4 @@ begin
Dest.SlotIndex := -1;
end;
-{ TBinaryOperatorHelper }
-
-function TBinaryOperatorHelper.ToString: string;
-begin
- case Self of
- boAdd: Result := '+';
- boSubtract: Result := '-';
- boMultiply: Result := '*';
- boDivide: Result := '/';
- boEqual: Result := '==';
- boNotEqual: Result := '!=';
- boLess: Result := '<';
- boGreater: Result := '>';
- boLessOrEqual: Result := '<=';
- boGreaterOrEqual: Result := '>=';
- else
- Result := '?';
- end;
-end;
-
-{ TUnaryOperatorHelper }
-
-function TUnaryOperatorHelper.ToString: string;
-begin
- case Self of
- uoNegate: Result := '-';
- uoNot: Result := 'not';
- else
- Result := '?';
- end;
-end;
-
end.
diff --git a/Src/Data/Myc.Data.Scalar.pas b/Src/Data/Myc.Data.Scalar.pas
index bd4fa3f..e905a6b 100644
--- a/Src/Data/Myc.Data.Scalar.pas
+++ b/Src/Data/Myc.Data.Scalar.pas
@@ -239,6 +239,14 @@ type
property TotalCount: Int64 read FTotalCount;
end;
+ TBinaryOperatorHelper = record helper for TBinaryOperator
+ function ToString: string;
+ end;
+
+ TUnaryOperatorHelper = record helper for TUnaryOperator
+ function ToString: string;
+ end;
+
implementation
{ TScalarValue }
@@ -1555,6 +1563,38 @@ begin
end;
end;
+{ TBinaryOperatorHelper }
+
+function TBinaryOperatorHelper.ToString: string;
+begin
+ case Self of
+ boAdd: Result := '+';
+ boSubtract: Result := '-';
+ boMultiply: Result := '*';
+ boDivide: Result := '/';
+ boEqual: Result := '==';
+ boNotEqual: Result := '!=';
+ boLess: Result := '<';
+ boGreater: Result := '>';
+ boLessOrEqual: Result := '<=';
+ boGreaterOrEqual: Result := '>=';
+ else
+ Result := '?';
+ end;
+end;
+
+{ TUnaryOperatorHelper }
+
+function TUnaryOperatorHelper.ToString: string;
+begin
+ case Self of
+ uoNegate: Result := '-';
+ uoNot: Result := 'not';
+ else
+ Result := '?';
+ end;
+end;
+
initialization
Assert(sizeof(TScalarValue) = 8);