Exemplo n.º 1
0
 public BoundProgram(BoundProgram previous,
                     ImmutableArray <Diagnostic> diagnostics,
                     FunctionSymbol mainFunction,
                     FunctionSymbol scriptFunction,
                     ImmutableDictionary <FunctionSymbol, BoundBlockStatement> functions)
 {
     Previous       = previous;
     Diagnostics    = diagnostics;
     MainFunction   = mainFunction;
     ScriptFunction = scriptFunction;
     Functions      = functions;
 }
Exemplo n.º 2
0
        private static void WriteProgram(BoundProgram node, IndentedTextWriter writer)
        {
            foreach (var function in node.Functions)
            {
                var unindent = writer.Indent > 0;
                if (unindent)
                {
                    writer.Indent--;
                }

                writer.WritePunctuation(function.Key.Name);
                writer.WritePunctuation(TokenKind.Colon);
                writer.WriteLine();

                WriteBlockStatement(function.Value, writer);
                writer.WriteLine();
            }
        }