public override void OnReferenceExpression(ReferenceExpression node) { Console.WriteLine("ConvertReferenceToStringLiteralCompilerStep: {0}", node.Name); var macro = node.GetAncestor(NodeType.MacroStatement) as MacroStatement; if (macro != null) { if (Array.Exists(macros, value => macro.Name == value)) { Console.WriteLine("ConvertReferenceToStringLiteralCompilerStep: replacing {0} at line {1}", node.Name, node.LexicalInfo.Line); ReplaceCurrentNode(new StringLiteralExpression(node.Name)); } } }