public override void ExitListIteration(HorseshoeParser.ListIterationContext context) { FlushBuffer(context.closeTrimStart != null); PopIndent(); m_writer.WriteLine("});"); m_symbols.PopScope(); m_trimLeadingWhitespaceFromBody = context.closeTrimEnd != null; }
public override void EnterListIteration(HorseshoeParser.ListIterationContext context) { FlushBuffer(context.openTrimStart != null); m_symbols.PushScope(context); m_symbols.AddSymbol(new Symbol(context.variable.GetText(), context.variable)); m_writer.WriteLine("_.each({0}, function ({1} : {2}) {{", GetVariableName(context.collection), context.variable.GetText(), context.type.GetText()); PushIndent(); m_trimLeadingWhitespaceFromBody = context.openTrimEnd != null; }