webassemblyjs
webassemblyjs copied to clipboard
refactor index
Attempt to fix https://github.com/xtuc/webassemblyjs/issues/405
The idea is to transform our Index that has either Identifier or NumerLiteral to a structure that contains both (the Identifier is optional tho).
Notes:
- The naming is awful (
indexOfIndex), any idea? - The tests are massively failing
For the naming, it might be worth using the terminology from the specification:

They refer to identifiers as being either numeric or symbolic.
This suggests to me something like the following:
{
type: "identifier",
symbolic: "log",
numeric: 23
}
Or the more verbose:
{
type: "identifier",
symbolicIdentifier: "log",
numericIdentifier: 23
}