Macro expander integrated in binder
This commit is contained in:
+9
-1
@@ -74,6 +74,7 @@ type
|
||||
public
|
||||
constructor Create(const AValue: TDataValue);
|
||||
function Accept(const Visitor: IAstVisitor): TDataValue; override;
|
||||
property Value: TDataValue read GetValue;
|
||||
end;
|
||||
|
||||
TIdentifierNode = class(TAstNode, IIdentifierNode)
|
||||
@@ -169,6 +170,7 @@ type
|
||||
public
|
||||
constructor Create(const AExpression: IAstNode);
|
||||
function Accept(const Visitor: IAstVisitor): TDataValue; override;
|
||||
property Expression: IAstNode read GetExpression;
|
||||
end;
|
||||
|
||||
TUnquoteNode = class(TAstNode, IUnquoteNode)
|
||||
@@ -865,7 +867,13 @@ end;
|
||||
|
||||
class function TAst.IfExpr(const ACondition: IAstNode; const AThenBranch, AElseBranch: IAstNode): IIfExpressionNode;
|
||||
begin
|
||||
Result := TIfExpressionNode.Create(ACondition, AThenBranch, AElseBranch);
|
||||
Result :=
|
||||
TIfExpressionNode.Create(
|
||||
ACondition,
|
||||
AThenBranch,
|
||||
if AElseBranch = nil then TBlockExpressionNode.Create([]) as IAstNode
|
||||
else AElseBranch
|
||||
);
|
||||
end;
|
||||
|
||||
class function TAst.Indexer(const ABase: IAstNode; const AIndex: IAstNode): IIndexerNode;
|
||||
|
||||
Reference in New Issue
Block a user