private static void GenerateErrorStatement(ScriptGenerator generator, MemberSymbol symbol, ErrorStatement statement) {
     ScriptTextWriter writer = generator.Writer;
     writer.Write("// ERROR: ");
     writer.Write(statement.Message);
     writer.WriteSignificantNewLine();
     writer.Write("// ERROR: at ");
     writer.Write(statement.Location);
     writer.WriteSignificantNewLine();
 }
        public Statement BuildStatement(StatementNode statementNode) {
            Statement statement = null;

            try {
                statement = BuildStatementCore(statementNode);
            }
            catch {
                string location = statementNode.Token.Location;
                string message = "Check that your C# source compiles and that you are not using an unsupported feature. " +
                                 "Common things to check for include use of fully-qualified names " +
                                 "(use a using statement to import namespaces instead) or " +
                                 "accessing private members of a type from a static member of the same type.";

                statement = new ErrorStatement(message, location);
                _errorHandler.ReportError(message, location);
            }

            return statement;
        }