Files
tree-sitter-vm/README.md
Sean O'Connor 85399605df Add README, .gitignore, and clean up build artifacts
- Added comprehensive README with usage instructions
- Added .gitignore to prevent build artifacts from being committed
- Removed target/ directories and duplicate WASM files
- Cleaned up parser binaries and test files
2025-09-11 11:27:31 -04:00

1.4 KiB

tree-sitter-vm

A Tree-sitter grammar for VM (Virtual Machine) language as used in the nand2tetris course.

Supported File Types

  • .vm - VM language source files

Features

  • Syntax highlighting for arithmetic, memory, program flow, and function commands
  • Code navigation with outline support for functions and labels
  • Bracket matching for all syntax elements
  • Integration with Zed editor and other Tree-sitter compatible editors

Usage

This grammar is designed to work with the nand2tetris-zed extension for Zed editor, providing complete language support for the nand2tetris course.

Grammar Details

  • Language: VM Language
  • Scope: source.vm
  • File Types: .vm
  • Node Types: push_command, pop_command, arithmetic_command, memory_command, program_flow_command, function_command

Development

Building

# Generate parser
tree-sitter generate

# Build parser
tree-sitter build

# Test grammar
tree-sitter test

License

MIT License - see LICENSE file for details.