Go to file
2019-08-20 15:03:41 +08:00
corpus feat: rename root with file 2019-08-20 15:01:47 +08:00
examples feat: initial implementation 2019-08-18 18:30:34 +08:00
src feat: rename root with file 2019-08-20 15:01:47 +08:00
.editorconfig feat: initial implementation 2019-08-18 18:30:34 +08:00
.gitattributes chore: update gitattributes and add prepack script 2019-08-18 21:13:19 +08:00
.gitignore feat: initial implementation 2019-08-18 18:30:34 +08:00
.npmignore feat: initial implementation 2019-08-18 18:30:34 +08:00
.prettierrc feat: initial implementation 2019-08-18 18:30:34 +08:00
.travis.yml feat: initial implementation 2019-08-18 18:30:34 +08:00
binding.gyp feat: initial implementation 2019-08-18 18:30:34 +08:00
CHANGELOG.md chore(release): 0.1.2 2019-08-20 15:03:41 +08:00
grammar.js feat: rename root with file 2019-08-20 15:01:47 +08:00
index.js feat: initial implementation 2019-08-18 18:30:34 +08:00
LICENSE feat: initial implementation 2019-08-18 18:30:34 +08:00
package.json chore(release): 0.1.2 2019-08-20 15:03:41 +08:00
README.md docs(readme): prettify example output 2019-08-18 21:21:14 +08:00
yarn.lock refactor: replace external tokens with internal ones 2019-08-19 23:58:20 +08:00

tree-sitter-toml

npm build

TOML (spec v0.5.0) grammar for tree-sitter

Changelog

Install

npm install tree-sitter-toml tree-sitter

Usage

const Parser = require("tree-sitter");
const TOML = require("tree-sitter-toml");

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

const sourceCode = `
  [hello]
  world = true
`;

const tree = parser.parse(sourceCode);
console.log(tree.rootNode.toString());
// (root
//   (table
//     (key)
//     (pair (key) (boolean))))

License

MIT © Ika