summaryrefslogtreecommitdiff
path: root/src/test-wast-parser.cc
Commit message (Collapse)AuthorAgeFilesLines
* [wat2wasm] Passive segments require bulk memory (#1203)Ben Smith2020-01-081-3/+3
|
* Fix some bugs w/ wast2json and SIMD (#1140)Ben Smith2019-08-101-1/+3
| | | | | * Never allow a null options pointer to `ParseWatModule` or `ParseWastScript` * Allow a token of type Int or Nat when parsing a simd float const
* Update spec testsuite (#1111)Ben Smith2019-07-161-5/+3
| | | | | * Remove passive keyword from bulk-memory * Fix rounding on hex floats * Allow underscores in NaN payloads
* Replace ErrorHandler with Errors and FormatErrors*Ben Smith2018-09-041-25/+24
| | | | | | | | | | | | | `ErrorHandler` complicated all error handling in wabt, since it was callback-based. Callbacks would be useful if we ever wanted to change behavior when an error occurred, but instead all that the handler ever did was write the errors to stdout/stderr or to a buffer. This change adds a new class `Error`, which contains an `ErrorLevel`, a `Location` and an error message. It also replaces ErrorHandler with `Errors` (a typedef for `std::vector<Error>`), and adds a couple of functions that can format a list of `Errors` for output: `FormatErrorsTo{String,File}`.
* Move WastLexer out of NameResolver, Validator, etc.Ben Smith2018-09-041-2/+2
| | | | Also remove wast-parser-lexer-shared.{cc,h}.
* Fix potential use-after-free in WastLexer (#626)Ben Smith2017-09-141-0/+88
Fixes issue #623. * Move Token into its own file. * Add WastParser tests. These ones are used because the source text is very large, and it may be useful to generate parser tests programmatically in the future too. * Reorganize TokenType by the union data member it uses. This makes it easier to determine which member needs to be constructed/copied/destroyed. - Bare (no data) - Literal - Opcode - String - Type * Make Token store its string/literal data directly, rather than share with lexer. This actually fixes the bug. * Fix a couple of line-printing bugs: - Very long tokens (e.g. "a" 20000 times) are now clamped to 80 chars. - Very long lines are displayed properly in errors (e.g. a line with 65000 columns).