All Projects → ikatyang → tree-sitter-yaml

ikatyang / tree-sitter-yaml

Licence: MIT License
YAML grammar for tree-sitter

Programming Languages

javascript
184084 projects - #8 most used programming language
C++
36643 projects - #6 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to tree-sitter-yaml

carvel-simple-app-on-kubernetes
K8s simple Go app example deployed with k14s tools
Stars: ✭ 23 (-20.69%)
Mutual labels:  yaml
dahgan
A YAML Parser
Stars: ✭ 14 (-51.72%)
Mutual labels:  yaml
tree-sitter-rescript
ReScript parser for Tree-Sitter
Stars: ✭ 20 (-31.03%)
Mutual labels:  tree-sitter
k8s-1abel
Kubernetes YAML/JSON survival kit
Stars: ✭ 21 (-27.59%)
Mutual labels:  yaml
yipee
An opensource version of the Yipee.io editor.
Stars: ✭ 20 (-31.03%)
Mutual labels:  yaml
python-yamlable
A thin wrapper of PyYaml to convert Python objects to YAML and back
Stars: ✭ 28 (-3.45%)
Mutual labels:  yaml
conduit
Simplified Data Exchange for HPC Simulations
Stars: ✭ 114 (+293.1%)
Mutual labels:  yaml
ansible-role-nvm
Ansible role for using NVM, Node Version Manager, locally.
Stars: ✭ 15 (-48.28%)
Mutual labels:  yaml
config-loader
Simple C++ Config Loader Framework(Serialization & Reflection)
Stars: ✭ 87 (+200%)
Mutual labels:  yaml
e9-cloudformation-docker-ecs
Docker on Amazon ECS with AWS Fargate using CloudFormation. https://devteds.com/episodes/9-docker-on-amazon-ecs-using-cloudformation
Stars: ✭ 78 (+168.97%)
Mutual labels:  yaml
yaml-frontmatter-loader
[DEPRECATED] Yaml frontmatter loader
Stars: ✭ 12 (-58.62%)
Mutual labels:  yaml
context-menu-maker
Make Windows Explorer context menus without COM
Stars: ✭ 23 (-20.69%)
Mutual labels:  yaml
dockerfiles
Dockerfile & kubernetes Yaml Templates
Stars: ✭ 44 (+51.72%)
Mutual labels:  yaml
yaml
A Laravel YAML parser and config loader
Stars: ✭ 100 (+244.83%)
Mutual labels:  yaml
spellsitter.nvim
Treesitter powered spellchecker
Stars: ✭ 251 (+765.52%)
Mutual labels:  tree-sitter
yaml-test-suite
Comprehensive, language independent Test Suite for YAML
Stars: ✭ 93 (+220.69%)
Mutual labels:  yaml
tree-edit
🌲 Structural editing in Emacs for any™ language!
Stars: ✭ 211 (+627.59%)
Mutual labels:  tree-sitter
biolink-model
Schema and generated objects for biolink data model and upper ontology
Stars: ✭ 83 (+186.21%)
Mutual labels:  yaml
yj
Command line tool that converts YAML to JSON
Stars: ✭ 62 (+113.79%)
Mutual labels:  yaml
logya
Logya is a static site generator written in Python designed to be easy to use and flexible.
Stars: ✭ 16 (-44.83%)
Mutual labels:  yaml

tree-sitter-yaml

npm build

YAML (YAML Spec v1.2) grammar for tree-sitter

Changelog

Install

npm install tree-sitter-yaml tree-sitter

Usage

const Parser = require("tree-sitter");
const YAML = require("tree-sitter-yaml");

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

const sourceCode = `
!!map
hello: &anchor
- world
`;

const tree = parser.parse(sourceCode);
console.log(tree.rootNode.toString());
// (stream
//   (document
//     (block_node
//       (tag)
//       (block_mapping
//         (block_mapping_pair
//           key: (flow_node
//             (plain_scalar
//               (string_scalar)))
//           value: (block_node
//             (anchor)
//             (block_sequence
//               (block_sequence_item
//                 (flow_node
//                   (plain_scalar
//                     (string_scalar)))))))))))

License

MIT © Ika

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].