diff options
author | Ben Smith <binjimin@gmail.com> | 2017-07-17 15:23:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-17 15:23:22 -0700 |
commit | 72ae6f4a7a8d3e417a8db6484a363328f08e6aa9 (patch) | |
tree | 10c50cbb9e0d5dbdcecf1e364432154378c49216 /src/wast-parser-lexer-shared.cc | |
parent | 31af1dcc64a26c0ebac901f773a2c9f359b07451 (diff) | |
download | wabt-72ae6f4a7a8d3e417a8db6484a363328f08e6aa9.tar.gz wabt-72ae6f4a7a8d3e417a8db6484a363328f08e6aa9.tar.bz2 wabt-72ae6f4a7a8d3e417a8db6484a363328f08e6aa9.zip |
Remove StringSlice (#576)
* Added StringTerminal only used by the lexer and parser, since we need an
object that has a non-trivial constructor/destructor (so it can be
included in the Token union).
* Name all terminal Token members with `t_` prefix
* Rename Literal -> LiteralTerminal, and only use for the lexer/parser.
* Move LiteralType to literal.h
* Use std::vector<std::string> for TextList and rename to TextVector
* Renamed CopyStringContents -> RemoveEscapes, and make it a template
so it can write to a std::string and a std::vector.
* Rename DupTextList -> RemoveEscapes, and simplify it
considerably.
Diffstat (limited to 'src/wast-parser-lexer-shared.cc')
-rw-r--r-- | src/wast-parser-lexer-shared.cc | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/wast-parser-lexer-shared.cc b/src/wast-parser-lexer-shared.cc index 659ebcbc..73161693 100644 --- a/src/wast-parser-lexer-shared.cc +++ b/src/wast-parser-lexer-shared.cc @@ -67,14 +67,4 @@ void wast_format_error(ErrorHandler* error_handler, va_end(args_copy); } -void destroy_text_list(TextList* text_list) { - TextListNode* node = text_list->first; - while (node) { - TextListNode* next = node->next; - destroy_string_slice(&node->text); - delete node; - node = next; - } -} - } // namespace wabt |