Refactoring for immutable nodes
This commit is contained in:
@@ -172,9 +172,9 @@ end;
|
||||
function TAstBinder.VisitFunctionCall(const Node: IFunctionCallNode): IAstNode;
|
||||
begin
|
||||
// --- Transformation: Keyword-as-Function ---
|
||||
if (Node.Callee is TKeywordNode) then
|
||||
if Node.Callee.Kind = akKeyword then
|
||||
begin
|
||||
var keywordNode := (Node.Callee as TKeywordNode);
|
||||
var keywordNode := Node.Callee.AsKeyword;
|
||||
if Length(Node.Arguments) <> 1 then
|
||||
raise EArgumentException.CreateFmt(
|
||||
'Keyword :%s expects exactly one argument (the record/map), but got %d',
|
||||
|
||||
Reference in New Issue
Block a user