docs: change WASM/wasm to Wasm
That is the official capitalisation.
This commit is contained in:
parent
7bc8f76667
commit
88e0b4cea4
36 changed files with 122 additions and 122 deletions
|
|
@ -7,7 +7,7 @@ export let Module: MainModule | null = null;
|
|||
/**
|
||||
* @internal
|
||||
*
|
||||
* Initialize the Tree-sitter WASM module. This should only be called by the {@link Parser} class via {@link Parser.init}.
|
||||
* Initialize the Tree-sitter Wasm module. This should only be called by the {@link Parser} class via {@link Parser.init}.
|
||||
*/
|
||||
export async function initializeBinding(moduleOptions?: Partial<EmscriptenModule>): Promise<MainModule> {
|
||||
if (!Module) {
|
||||
|
|
@ -19,7 +19,7 @@ export async function initializeBinding(moduleOptions?: Partial<EmscriptenModule
|
|||
/**
|
||||
* @internal
|
||||
*
|
||||
* Checks if the Tree-sitter WASM module has been initialized.
|
||||
* Checks if the Tree-sitter Wasm module has been initialized.
|
||||
*/
|
||||
export function checkModule(): boolean {
|
||||
return !!Module;
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ export function isPoint(point?: Point): point is Point {
|
|||
/**
|
||||
* @internal
|
||||
*
|
||||
* Sets the Tree-sitter WASM module. This should only be called by the {@link Parser} class via {@link Parser.init}.
|
||||
* Sets the Tree-sitter Wasm module. This should only be called by the {@link Parser} class via {@link Parser.init}.
|
||||
*/
|
||||
export function setModule(module: MainModule) {
|
||||
C = module;
|
||||
|
|
@ -127,7 +127,7 @@ export function setModule(module: MainModule) {
|
|||
/**
|
||||
* @internal
|
||||
*
|
||||
* `C` is a convenient shorthand for the Tree-sitter WASM module,
|
||||
* `C` is a convenient shorthand for the Tree-sitter Wasm module,
|
||||
* which allows us to call all of the exported functions.
|
||||
*/
|
||||
export let C: MainModule;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export class LanguageMetadata {
|
|||
*/
|
||||
export class Language {
|
||||
/** @internal */
|
||||
private [0] = 0; // Internal handle for WASM
|
||||
private [0] = 0; // Internal handle for Wasm
|
||||
|
||||
/**
|
||||
* A list of all node types in the language. The index of each type in this
|
||||
|
|
@ -282,8 +282,8 @@ export class Language {
|
|||
const functionName = symbolNames.find((key) => LANGUAGE_FUNCTION_REGEX.test(key) &&
|
||||
!key.includes('external_scanner_'));
|
||||
if (!functionName) {
|
||||
console.log(`Couldn't find language function in WASM file. Symbols:\n${JSON.stringify(symbolNames, null, 2)}`);
|
||||
throw new Error('Language.load failed: no language function found in WASM file');
|
||||
console.log(`Couldn't find language function in Wasm file. Symbols:\n${JSON.stringify(symbolNames, null, 2)}`);
|
||||
throw new Error('Language.load failed: no language function found in Wasm file');
|
||||
}
|
||||
const languageAddress = mod[functionName]();
|
||||
return new Language(INTERNAL, languageAddress);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { Language } from './language';
|
|||
|
||||
export class LookaheadIterator implements Iterable<string> {
|
||||
/** @internal */
|
||||
private [0] = 0; // Internal handle for WASM
|
||||
private [0] = 0; // Internal handle for Wasm
|
||||
|
||||
/** @internal */
|
||||
private language: Language;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { TRANSFER_BUFFER } from './parser';
|
|||
/** A single node within a syntax {@link Tree}. */
|
||||
export class Node {
|
||||
/** @internal */
|
||||
private [0] = 0; // Internal handle for WASM
|
||||
private [0] = 0; // Internal handle for Wasm
|
||||
|
||||
/** @internal */
|
||||
private _children?: Node[];
|
||||
|
|
@ -427,7 +427,7 @@ export class Node {
|
|||
}
|
||||
}
|
||||
|
||||
// Copy the array of symbols to the WASM heap
|
||||
// Copy the array of symbols to the Wasm heap
|
||||
const symbolsAddress = C._malloc(SIZE_OF_INT * symbols.length);
|
||||
for (let i = 0, n = symbols.length; i < n; i++) {
|
||||
C.setValue(symbolsAddress + i * SIZE_OF_INT, symbols[i], 'i32');
|
||||
|
|
|
|||
|
|
@ -88,10 +88,10 @@ export let MIN_COMPATIBLE_VERSION: number;
|
|||
*/
|
||||
export class Parser {
|
||||
/** @internal */
|
||||
private [0] = 0; // Internal handle for WASM
|
||||
private [0] = 0; // Internal handle for Wasm
|
||||
|
||||
/** @internal */
|
||||
private [1] = 0; // Internal handle for WASM
|
||||
private [1] = 0; // Internal handle for Wasm
|
||||
|
||||
/** @internal */
|
||||
private logCallback: LogCallback | null = null;
|
||||
|
|
@ -102,7 +102,7 @@ export class Parser {
|
|||
/**
|
||||
* This must always be called before creating a Parser.
|
||||
*
|
||||
* You can optionally pass in options to configure the WASM module, the most common
|
||||
* You can optionally pass in options to configure the Wasm module, the most common
|
||||
* one being `locateFile` to help the module find the `.wasm` file.
|
||||
*/
|
||||
static async init(moduleOptions?: Partial<EmscriptenModule>) {
|
||||
|
|
|
|||
|
|
@ -499,7 +499,7 @@ function parsePattern(
|
|||
|
||||
export class Query {
|
||||
/** @internal */
|
||||
private [0] = 0; // Internal handle for WASM
|
||||
private [0] = 0; // Internal handle for Wasm
|
||||
|
||||
/** @internal */
|
||||
private exceededMatchLimit: boolean;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export function getText(tree: Tree, startIndex: number, endIndex: number, startP
|
|||
/** A tree that represents the syntactic structure of a source code file. */
|
||||
export class Tree {
|
||||
/** @internal */
|
||||
private [0] = 0; // Internal handle for WASM
|
||||
private [0] = 0; // Internal handle for Wasm
|
||||
|
||||
/** @internal */
|
||||
textCallback: ParseCallback;
|
||||
|
|
|
|||
|
|
@ -7,16 +7,16 @@ import { getText, Tree } from './tree';
|
|||
/** A stateful object for walking a syntax {@link Tree} efficiently. */
|
||||
export class TreeCursor {
|
||||
/** @internal */
|
||||
private [0] = 0; // Internal handle for WASM
|
||||
private [0] = 0; // Internal handle for Wasm
|
||||
|
||||
/** @internal */
|
||||
private [1] = 0; // Internal handle for WASM
|
||||
private [1] = 0; // Internal handle for Wasm
|
||||
|
||||
/** @internal */
|
||||
private [2] = 0; // Internal handle for WASM
|
||||
private [2] = 0; // Internal handle for Wasm
|
||||
|
||||
/** @internal */
|
||||
private [3] = 0; // Internal handle for WASM
|
||||
private [3] = 0; // Internal handle for Wasm
|
||||
|
||||
/** @internal */
|
||||
private tree: Tree;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue