Refactoring for immutable nodes
This commit is contained in:
@@ -511,7 +511,7 @@ begin
|
||||
raise Exception.Create('Syntax Error: Missing value for key ' + fieldName + ' in record literal.');
|
||||
fieldValue := ParseExpression.Node;
|
||||
|
||||
fields.Add(TRecordFieldLiteral.Create(TKeywordNode.Create(TKeywordRegistry.Intern(fieldName)), fieldValue));
|
||||
fields.Add(TRecordFieldLiteral.Create(TAst.Keyword(fieldName), fieldValue));
|
||||
end;
|
||||
|
||||
Result := TAst.RecordLiteral(fields.ToArray);
|
||||
@@ -945,7 +945,7 @@ var
|
||||
arg: IAstNode;
|
||||
begin
|
||||
// Special case for (quote ...) to print it as '...
|
||||
if (Node.Callee is TIdentifierNode) and (TIdentifierNode(Node.Callee).Name = 'quote') and (Length(Node.Arguments) = 1) then
|
||||
if (Node.Callee.Kind = akIdentifier) and (Node.Callee.AsIdentifier.Name = 'quote') and (Length(Node.Arguments) = 1) then
|
||||
begin
|
||||
Append('''');
|
||||
Node.Arguments[0].Accept(Self);
|
||||
|
||||
Reference in New Issue
Block a user