Skip to content

About

🌳 AiScript grammar for tree-sitter

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

tree-sitter-aiscript

Example(NodeJS):

import { fileURLToPath } from "node:url";
import { readFile } from "node:fs/promises";
import { Parser, Language } from "web-tree-sitter";

const wasmBinaryPath =
  fileURLToPath(
    import.meta.resolve("@aiscript-dev/tree-sitter-aiscript/tree-sitter-aiscript.wasm")
  );

await Parser.init();

const parser =
  await readFile(wasmBinaryPath)
    .then(x => Language.load(x))
    .then(x => new Parser().setLanguage(x));

const tree = parser.parse(`<: "Hello, world!"`);

console.log(tree?.rootNode.toString());

About

🌳 AiScript grammar for tree-sitter

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages