3.0.0-alpha.2 • Published 12 months ago

tree-sitter-usfm3 v3.0.0-alpha.2

Weekly downloads
-
License
MIT License
Repository
github
Last release
12 months ago

Tree-sitter-usfm

Tree sitter implementation of the USFM language.

Installation

npm install tree-sitter-usfm3

Usage

const Parser = require('tree-sitter');
const USFM3 = require('tree-sitter-usfm3');

const parser = new Parser();
parser.setLanguage(USFM3);

const sourceCode = '\\id GEN\n\\c 1\n\\p\n\\v 1 In the begining..';
const tree = parser.parse(sourceCode);

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