Where Online Learning is simpler!
The C and C++ Include Header Files
cat -n /usr/include/wabt/error-formatter.h
1 /* 2 * Copyright 2018 WebAssembly Community Group participants 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef WABT_ERROR_FORMATTER_H_ 18 #define WABT_ERROR_FORMATTER_H_ 19 20 #include <cstdio> 21 #include <memory> 22 #include <string> 23 24 #include "wabt/color.h" 25 #include "wabt/error.h" 26 #include "wabt/lexer-source-line-finder.h" 27 28 namespace wabt { 29 30 enum class PrintHeader { 31 Never, 32 Once, 33 Always, 34 }; 35 36 std::string FormatErrorsToString(const Errors&, 37 Location::Type, 38 LexerSourceLineFinder* = nullptr, 39 const Color& color = Color(nullptr, false), 40 const std::string& header = {}, 41 PrintHeader print_header = PrintHeader::Never, 42 int source_line_max_length = 80); 43 44 void FormatErrorsToFile(const Errors&, 45 Location::Type, 46 LexerSourceLineFinder* = nullptr, 47 FILE* = stderr, 48 const std::string& header = {}, 49 PrintHeader print_header = PrintHeader::Never, 50 int source_line_max_length = 80); 51 52 } // namespace wabt 53 54 #endif // WABT_ERROR_FORMATTER_H_