Go to file
2020-11-14 13:00:35 +08:00
corpus fix: immediate hash in string is considered content instead of comment (#18) 2020-11-14 12:57:50 +08:00
docs chore(release): 0.4.1 2020-11-14 13:00:35 +08:00
examples feat: initial implementation 2019-08-18 18:30:34 +08:00
queries feat: add queries for highlighting (#13) 2020-07-04 16:17:01 +08:00
scripts chore: use git submodule 2020-07-04 16:45:48 +08:00
src fix: immediate hash in string is considered content instead of comment (#18) 2020-11-14 12:57:50 +08:00
toml-spec feat: upgrade to TOML spec v1.0.0-rc.1 (#11) 2020-06-29 00:08:52 +08:00
tree-sitter@1ccb0ac0e8 chore: upgrade playground 2020-10-02 15:48:44 +08:00
.editorconfig fix: trailing whitespaces are allowed for local_time (#3) 2019-08-21 09:13:14 +08:00
.gitattributes chore: revert the previous commit and set *.wasm as binary 2019-09-01 01:16:46 +08:00
.gitignore chore: use git submodule 2020-07-04 16:45:48 +08:00
.gitmodules chore: use git submodule 2020-07-04 16:45:48 +08:00
.npmignore feat: initial implementation 2019-08-18 18:30:34 +08:00
.travis.yml chore: use tree-sitter-cli@0.15.9-custom 2019-09-30 15:14:55 +08:00
binding.gyp feat: initial implementation 2019-08-18 18:30:34 +08:00
CHANGELOG.md chore(release): 0.4.1 2020-11-14 13:00:35 +08:00
grammar.js fix: immediate hash in string is considered content instead of comment (#18) 2020-11-14 12:57:50 +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.4.1 2020-11-14 13:00:35 +08:00
README.md feat: upgrade to TOML spec v1.0.0-rc.1 (#11) 2020-06-29 00:08:52 +08:00
yarn.lock chore(deps): bump yargs-parser from 13.1.1 to 13.1.2 (#16) 2020-09-11 13:14:00 +08:00

tree-sitter-toml

npm build

TOML (TOML Spec v1.0.0-rc.1) 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());
// (document
//   (table
//     (key)
//     (pair
//       (key) (boolean))))

License

MIT © Ika