diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..255d670 --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +# Build artifacts +target/ +*.wasm +*.dylib +*.so +*.dll +*.dylib +*.a +*.o + +# Node modules +node_modules/ + +# IDE files +.vscode/ +.idea/ +*.swp +*.swo + +# OS files +.DS_Store +Thumbs.db + +# Logs +*.log diff --git a/README.md b/README.md new file mode 100644 index 0000000..5ad9cea --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +# tree-sitter-xml + +A [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) grammar for XML files as used in the [nand2tetris](https://www.nand2tetris.org/) course. + +## Supported File Types + +- `.xml` - XML compiler output files + +## Features + +- **Syntax highlighting** for XML elements, attributes, and text content +- **Code navigation** with outline support for XML structure +- **Bracket matching** for XML tags +- **Integration** with Zed editor and other Tree-sitter compatible editors + +## Usage + +This grammar is designed to work with the [nand2tetris-zed](https://github.com/soconnor0919/nand2tetris-zed) extension for Zed editor, providing complete language support for the nand2tetris course. + +## Grammar Details + +- **Language**: XML +- **Scope**: `source.xml` +- **File Types**: `.xml` +- **Node Types**: `element`, `tag_name`, `attribute`, `attribute_name`, `attribute_value`, `text`, `comment` + +## Development + +### Building + +```bash +# Generate parser +tree-sitter generate + +# Build parser +tree-sitter build + +# Test grammar +tree-sitter test +``` + +## License + +MIT License - see [LICENSE](LICENSE) file for details. + +## Related + +- [nand2tetris-zed](https://github.com/soconnor0919/nand2tetris-zed) - Complete Zed extension +- [nand2tetris.org](https://www.nand2tetris.org/) - Course website +- [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) - Parser generator diff --git a/parser.dylib b/parser.dylib deleted file mode 100755 index c405e81..0000000 Binary files a/parser.dylib and /dev/null differ