| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
* Never allow a null options pointer to `ParseWatModule` or
`ParseWastScript`
* Allow a token of type Int or Nat when parsing a simd float const
|
|
|
|
|
| |
* Remove passive keyword from bulk-memory
* Fix rounding on hex floats
* Allow underscores in NaN payloads
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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}`.
|
|
|
|
| |
Also remove wast-parser-lexer-shared.{cc,h}.
|
|
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).
|