The repository defines Abstract Syntax Tree (AST) format that can be used to represent the structure of WebAssembly program in a JSON container.
MIT LICENSE
WebAssembly AST specification
License: MIT License
The repository defines Abstract Syntax Tree (AST) format that can be used to represent the structure of WebAssembly program in a JSON container.
MIT LICENSE
It could be useful to include a comment
type.
Currently we have
{
kind: 'if',
test: <expr>,
consequent: <expr>,
alternate: <expr> | null
}
But most WASM documentation refers to then
and else
so what about ?
{
kind: 'if',
test: <expr>,
then: <expr>,
else: <expr> | null
}
Byte-code values for:
https://github.com/drom/wast-asm
https://github.com/drom/wast-diz
could we possible use the shift AST format?
How would types be represented (i64, i32..)?
How would extending Shift to add rules for wast work?
cc @michaelficarra
so it might be a little bit more consistent if we went from identifier.id
to identifier.string
and change literal.raw
to literal.string
related to drom/wast-parser#10
Having one kind of literals is sort of confusing.
We can split them:
literalString
--> value: Stringliterali32
--> value: Numberliteralf32
literalf64
literali64
--> value: [ Number, Number ] (low, high) parts of numberPlaces to change:
related to: drom/wast-parser#7
if you have like an empty block
{
"kind":"block",
"id":null,
"body":[ ]
}
If the empty keys were dropped would it still be valid according to the spec? So like this
{
"kind":"block"
}
Set of structures and methods useful for other WAST tools.
so item here should be a type
{
kind: 'param',
items: [ <item> ]
}
would this make sense?
{
kind: 'param',
items: [ <type> ]
}
We have 2 type of node hierarchical properties:
Object
-- scalar childArray
-- vector childit should be possible to know type of the property value by name of the property key, like:
id, expr, init, test, consequent, alternate, left, right, result, module, failure, invoke
-- Object
body, items, params, local, segment
-- Array
Find all mismatches and fix.
func.param -> func.params
br_table.expr -> br_table.SOMETHING_ARRAY_LIKE
Tool we can use: https://github.com/okaxaki/pegjs-strip
I think name1
is the module name and name2
is the name of an exported function. What do you think about more meaningful names for the names here?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.