Go to file
2021-05-11 12:47:32 +08:00
bindings/node feat: upgrade to tree-sitter@0.19.3 2021-03-14 18:59:58 +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.5.1 2021-03-21 20:20:49 +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 feat: upgrade to tree-sitter@0.19.3 2021-03-14 18:59:58 +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@fc5a692b7d feat: upgrade to tree-sitter@0.19.3 2021-03-14 18:59:58 +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 feat: upgrade to tree-sitter@0.19.3 2021-03-14 18:59:58 +08:00
.gitmodules feat: upgrade to tree-sitter@0.19.3 2021-03-14 18:59:58 +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: upgrade to tree-sitter@0.19.3 2021-03-14 18:59:58 +08:00
CHANGELOG.md chore(release): 0.5.1 2021-03-21 20:20:49 +08:00
grammar.js fix: immediate hash in string is considered content instead of comment (#18) 2020-11-14 12:57:50 +08:00
LICENSE feat: initial implementation 2019-08-18 18:30:34 +08:00
package.json chore(release): 0.5.1 2021-03-21 20:20:49 +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 hosted-git-info from 2.8.4 to 2.8.9 (#23) 2021-05-11 12:47:32 +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