@webassemblyjs/ast
AST utils for webassemblyjs
Last updated 6 years ago by xtuc .
MIT · Repository · Original npm · Tarball · package.json
$ gnpm install @webassemblyjs/ast 
SYNC missed versions from official npm registry.

@webassemblyjs/ast

AST utils for webassemblyjs

Installation

yarn add @webassemblyjs/ast

Usage

Traverse

import { traverse } from "@webassemblyjs/ast";

traverse(ast, {
  Module(path) {
    console.log(path.node);
  }
});

Instruction signatures

import { signatures } from "@webassemblyjs/ast";

console.log(signatures);

Path methods

  • findParent: NodeLocator
  • replaceWith: Node => void
  • remove: () => void
  • insertBefore: Node => void
  • insertAfter: Node => void
  • stop: () => void

AST utils

  • function module(id, fields, metadata)
  • function moduleMetadata(sections, functionNames, localNames)
  • function moduleNameMetadata(value)
  • function functionNameMetadata(value, index)
  • function localNameMetadata(value, localIndex, functionIndex)
  • function binaryModule(id, blob)
  • function quoteModule(id, string)
  • function sectionMetadata(section, startOffset, size, vectorOfSize)
  • function loopInstruction(label, resulttype, instr)
  • function instruction(id, args, namedArgs)
  • function objectInstruction(id, object, args, namedArgs)
  • function ifInstruction(testLabel, test, result, consequent, alternate)
  • function stringLiteral(value)
  • function numberLiteralFromRaw(value, raw)
  • function longNumberLiteral(value, raw)
  • function floatLiteral(value, nan, inf, raw)
  • function elem(table, offset, funcs)
  • function indexInFuncSection(index)
  • function valtypeLiteral(name)
  • function typeInstruction(id, functype)
  • function start(index)
  • function globalType(valtype, mutability)
  • function leadingComment(value)
  • function blockComment(value)
  • function data(memoryIndex, offset, init)
  • function global(globalType, init, name)
  • function table(elementType, limits, name, elements)
  • function memory(limits, id)
  • function funcImportDescr(id, signature)
  • function moduleImport(module, name, descr)
  • function moduleExportDescr(exportType, id)
  • function moduleExport(name, descr)
  • function limit(min, max)
  • function signature(params, results)
  • function program(body)
  • function identifier(value, raw)
  • function blockInstruction(label, instr, result)
  • function callInstruction(index, instrArgs)
  • function callIndirectInstruction(signature, intrs)
  • function byteArray(values)
  • function func(name, signature, body, isExternal, metadata)
  • ConstantisModule
  • ConstantisModuleMetadata
  • ConstantisModuleNameMetadata
  • ConstantisFunctionNameMetadata
  • ConstantisLocalNameMetadata
  • ConstantisBinaryModule
  • ConstantisQuoteModule
  • ConstantisSectionMetadata
  • ConstantisLoopInstruction
  • ConstantisInstruction
  • ConstantisObjectInstruction
  • ConstantisIfInstruction
  • ConstantisStringLiteral
  • ConstantisNumberLiteral
  • ConstantisLongNumberLiteral
  • ConstantisFloatLiteral
  • ConstantisElem
  • ConstantisIndexInFuncSection
  • ConstantisValtypeLiteral
  • ConstantisTypeInstruction
  • ConstantisStart
  • ConstantisGlobalType
  • ConstantisLeadingComment
  • ConstantisBlockComment
  • ConstantisData
  • ConstantisGlobal
  • ConstantisTable
  • ConstantisMemory
  • ConstantisFuncImportDescr
  • ConstantisModuleImport
  • ConstantisModuleExportDescr
  • ConstantisModuleExport
  • ConstantisLimit
  • ConstantisSignature
  • ConstantisProgram
  • ConstantisIdentifier
  • ConstantisBlockInstruction
  • ConstantisCallInstruction
  • ConstantisCallIndirectInstruction
  • ConstantisByteArray
  • ConstantisFunc
  • ConstantassertModule
  • ConstantassertModuleMetadata
  • ConstantassertModuleNameMetadata
  • ConstantassertFunctionNameMetadata
  • ConstantassertLocalNameMetadata
  • ConstantassertBinaryModule
  • ConstantassertQuoteModule
  • ConstantassertSectionMetadata
  • ConstantassertLoopInstruction
  • ConstantassertInstruction
  • ConstantassertObjectInstruction
  • ConstantassertIfInstruction
  • ConstantassertStringLiteral
  • ConstantassertNumberLiteral
  • ConstantassertLongNumberLiteral
  • ConstantassertFloatLiteral
  • ConstantassertElem
  • ConstantassertIndexInFuncSection
  • ConstantassertValtypeLiteral
  • ConstantassertTypeInstruction
  • ConstantassertStart
  • ConstantassertGlobalType
  • ConstantassertLeadingComment
  • ConstantassertBlockComment
  • ConstantassertData
  • ConstantassertGlobal
  • ConstantassertTable
  • ConstantassertMemory
  • ConstantassertFuncImportDescr
  • ConstantassertModuleImport
  • ConstantassertModuleExportDescr
  • ConstantassertModuleExport
  • ConstantassertLimit
  • ConstantassertSignature
  • ConstantassertProgram
  • ConstantassertIdentifier
  • ConstantassertBlockInstruction
  • ConstantassertCallInstruction
  • ConstantassertCallIndirectInstruction
  • ConstantassertByteArray
  • ConstantassertFunc

Current Tags

  • 1.11.6                                ...           latest (2 years ago)

85 Versions

  • 1.11.6                                ...           2 years ago
  • 1.11.5                                ...           2 years ago
  • 1.11.3                                ...           2 years ago
  • 1.11.1                                ...           3 years ago
  • 1.11.0                                ...           4 years ago
  • 1.10.1                                ...           4 years ago
  • 1.10.0                                ...           4 years ago
  • 1.9.1                                ...           4 years ago
  • 1.9.0                                ...           5 years ago
  • 1.8.5                                ...           6 years ago
  • 1.8.4                                ...           6 years ago
  • 1.8.3                                ...           6 years ago
  • 1.8.2                                ...           6 years ago
  • 1.8.1                                ...           6 years ago
  • 1.8.0                                ...           6 years ago
  • 1.7.11                                ...           6 years ago
  • 1.7.10                                ...           6 years ago
  • 1.7.9                                ...           6 years ago
  • 1.7.8                                ...           6 years ago
  • 1.7.7                                ...           6 years ago
  • 1.7.6                                ...           6 years ago
  • 1.7.5                                ...           6 years ago
  • 1.7.4                                ...           6 years ago
  • 1.7.3                                ...           6 years ago
  • 1.7.2                                ...           6 years ago
  • 1.7.2-1                                ...           6 years ago
  • 1.7.2-0                                ...           6 years ago
  • 1.7.1                                ...           6 years ago
  • 1.7.0                                ...           6 years ago
  • 1.7.0-3                                ...           6 years ago
  • 1.7.0-2                                ...           6 years ago
  • 1.7.0-1                                ...           6 years ago
  • 1.6.1                                ...           6 years ago
  • 1.7.1-0                                ...           6 years ago
  • 1.7.0-0                                ...           6 years ago
  • 1.6.0                                ...           6 years ago
  • 1.5.13                                ...           6 years ago
  • 1.5.12                                ...           7 years ago
  • 1.5.11                                ...           7 years ago
  • 1.5.10                                ...           7 years ago
  • 1.5.9                                ...           7 years ago
  • 1.5.8                                ...           7 years ago
  • 1.5.7                                ...           7 years ago
  • 1.5.6                                ...           7 years ago
  • 1.5.5                                ...           7 years ago
  • 1.5.4                                ...           7 years ago
  • 1.5.3                                ...           7 years ago
  • 1.5.2                                ...           7 years ago
  • 1.5.1                                ...           7 years ago
  • 1.5.0                                ...           7 years ago
  • 1.4.3                                ...           7 years ago
  • 1.4.2                                ...           7 years ago
  • 1.4.1                                ...           7 years ago
  • 1.4.0                                ...           7 years ago
  • 1.3.3                                ...           7 years ago
  • 1.3.2                                ...           7 years ago
  • 1.3.1                                ...           7 years ago
  • 1.3.0                                ...           7 years ago
  • 1.2.8                                ...           7 years ago
  • 1.2.7                                ...           7 years ago
  • 1.2.6                                ...           7 years ago
  • 1.2.5                                ...           7 years ago
  • 1.2.4                                ...           7 years ago
  • 1.2.3                                ...           7 years ago
  • 1.2.2                                ...           7 years ago
  • 1.2.1                                ...           7 years ago
  • 1.2.0                                ...           7 years ago
  • 1.1.2-y.10                                ...           7 years ago
  • 1.1.2-y.9                                ...           7 years ago
  • 1.1.2-y.8                                ...           7 years ago
  • 1.1.2-y.7                                ...           7 years ago
  • 1.1.2-y.6                                ...           7 years ago
  • 1.1.2-y.5                                ...           7 years ago
  • 1.1.2-y.4                                ...           7 years ago
  • 1.1.2-y.3                                ...           7 years ago
  • 1.1.2-y.2                                ...           7 years ago
  • 1.1.2-y.1                                ...           7 years ago
  • 1.1.2-y.0                                ...           7 years ago
  • 1.1.1                                ...           7 years ago
  • 1.1.0                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
  • 1.0.0-y.8                                ...           7 years ago
  • 1.0.0-y.7                                ...           7 years ago
  • 1.0.0-y.6                                ...           7 years ago
  • 1.0.0-y.5                                ...           7 years ago

Copyright 2013 - present © cnpmjs.org | Home |