diff options
author | Ben Smith <binji@chromium.org> | 2016-05-09 12:37:36 -0700 |
---|---|---|
committer | Ben Smith <binji@chromium.org> | 2016-05-09 13:01:59 -0700 |
commit | 051cbf7d40391907dba9e7b395b347a6e888dbf3 (patch) | |
tree | dd606fb9d22836fa8775408e16fc2c84387ab76f /src/wasm-ast-parser-lexer-shared.h | |
parent | 92bfdd8738aafda989ef6169a9c70e1edf776dc7 (diff) | |
download | wabt-051cbf7d40391907dba9e7b395b347a6e888dbf3.tar.gz wabt-051cbf7d40391907dba9e7b395b347a6e888dbf3.tar.bz2 wabt-051cbf7d40391907dba9e7b395b347a6e888dbf3.zip |
parse split segment strings; modules as binaries
Diffstat (limited to 'src/wasm-ast-parser-lexer-shared.h')
-rw-r--r-- | src/wasm-ast-parser-lexer-shared.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wasm-ast-parser-lexer-shared.h b/src/wasm-ast-parser-lexer-shared.h index b2346eb6..c1ec8674 100644 --- a/src/wasm-ast-parser-lexer-shared.h +++ b/src/wasm-ast-parser-lexer-shared.h @@ -38,6 +38,16 @@ typedef struct WasmExprList { size_t size; } WasmExprList; +typedef struct WasmTextListNode { + WasmStringSlice text; + struct WasmTextListNode* next; +} WasmTextListNode; + +typedef struct WasmTextList { + WasmTextListNode* first; + WasmTextListNode* last; +} WasmTextList; + typedef union WasmToken { /* terminals */ WasmStringSlice text; @@ -50,6 +60,7 @@ typedef union WasmToken { tokens is a hotspot when parsing large files. */ uint32_t u32; uint64_t u64; + WasmTextList text_list; WasmTypeVector types; WasmVar var; WasmVarVector vars; @@ -102,6 +113,7 @@ void wasm_ast_format_error(WasmSourceErrorHandler*, WasmAstLexer*, const char* format, va_list); +void wasm_destroy_text_list(WasmAllocator*, WasmTextList*); WASM_EXTERN_C_END #endif /* WASM_AST_PARSER_LEXER_SHARED_H_ */ |