Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Files

tree_sitter_v

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Aug 27, 2021
Oct 25, 2022
Jan 27, 2023
Jan 27, 2023
Jan 27, 2023
Nov 21, 2021
Feb 12, 2022
Aug 27, 2021
Aug 27, 2021
Aug 27, 2021
Aug 27, 2021
Nov 21, 2021
Oct 25, 2022
Mar 22, 2023
Jan 27, 2023
Mar 22, 2023
Jun 8, 2022
Aug 27, 2021
Apr 22, 2022

tree-sitter-v

V language grammar for tree-sitter

build/test report-badge

Existing grammars

This grammar is heavily derived from the following language grammars:

Installation

npm install tree-sitter-v
const Parser = require('tree-sitter');
const V = require('tree-sitter-v');

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

Usage with V [v-tree-sitter (soon)]

// TODO:
import treesitter
import tree_sitter_v.bindings.v

fn main() {
  mut parser := treesitter.new_parser()
  parser.set_language(v.language)
}

Limitations

  1. It does not support all deprecated/outdated syntaxes to avoid any ambiguities and to enforce the one-way philosophy as much as possible.
  2. Assembly/SQL code in ASM/SQL block nodes are loosely checked and parsed immediately regardless of the content.
  3. Syntaxes specific for implementing JS and native compilation support are not and will not be implemented unless a consensus has been reached. Features from "Compiler magic" are being generalized into different nodes as much as possible.