summaryrefslogtreecommitdiff
path: root/src/ast-parser.h
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2017-04-24 15:18:57 -0700
committerGitHub <noreply@github.com>2017-04-24 15:18:57 -0700
commitf78f159d836ed6920f7a656a693220bbc9b5bbd6 (patch)
tree6b54d78ead821b7b524492bdde1ba8588d358bbb /src/ast-parser.h
parentbcdb11f2ab3d778a83bf53ddfbd174b70ebaf02a (diff)
downloadwabt-f78f159d836ed6920f7a656a693220bbc9b5bbd6.tar.gz
wabt-f78f159d836ed6920f7a656a693220bbc9b5bbd6.tar.bz2
wabt-f78f159d836ed6920f7a656a693220bbc9b5bbd6.zip
Change {Source,Binary}ErrorHandler to C++ (#403)
Added some new classes: * BinaryErrorHandler: abstract base class * BinaryErrorHandlerFile: writes errors to a FILE* * SourceErrorHandler: abstract base class * SourceErrorHandlerNop: eats all errors * SourceErrorHandlerFile: writes errors to a FILE* There are some specific ones as well: * BinaryErrorHandlerAssert: used in wasm-interp to handle writing out a custom header with assertion "failures"; i.e. places where the error handler should fire. * BinaryErrorHandlerModule: used when parsing a .wast, but there's an embedded binary file.
Diffstat (limited to 'src/ast-parser.h')
-rw-r--r--src/ast-parser.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ast-parser.h b/src/ast-parser.h
index 0992d16b..4cd90f31 100644
--- a/src/ast-parser.h
+++ b/src/ast-parser.h
@@ -18,15 +18,13 @@
#define WABT_AST_PARSER_H_
#include "ast-lexer.h"
-#include "common.h"
namespace wabt {
struct Script;
+class SourceErrorHandler;
-Result parse_ast(AstLexer* lexer,
- struct Script** out_script,
- SourceErrorHandler*);
+Result parse_ast(AstLexer* lexer, Script** out_script, SourceErrorHandler*);
} // namespace wabt