From c4034857c7b6f0cd30e64ce93c8ad636c03c20c7 Mon Sep 17 00:00:00 2001 From: Sean O'Connor Date: Thu, 11 Sep 2025 11:27:28 -0400 Subject: [PATCH] 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 --- .gitignore | 25 +++++++++++++++++++++++++ README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ parser.dylib | Bin 33824 -> 0 bytes 3 files changed, 73 insertions(+) create mode 100644 .gitignore create mode 100644 README.md delete mode 100755 parser.dylib 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..ac41c43 --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +# tree-sitter-hack-binary + +A [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) grammar for Hack Binary machine code as used in the [nand2tetris](https://www.nand2tetris.org/) course. + +## Supported File Types + +- `.hack` - Hack Binary machine code files + +## Features + +- **Syntax highlighting** for 16-bit binary instructions +- **Code navigation** with outline support +- **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**: Hack Binary +- **Scope**: `source.hack_binary` +- **File Types**: `.hack` + +## 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 7881b8398d0c6b96ba1bf1885086b2f577d23a69..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 33824 zcmeI5e{38_702J+`FCQ+O&k)`6rWoZ($M;7Y}5i$a&8kyMAd}k5?oYRukY6O;k!Ni zc3s?*-9cPsH|psnP?aE4x{gaz5zOq3HPZCy$Q1Ct3(NOa2c-IpA+|;GxwW) zt|VQHO5DynADbL|>+cA(zUN+?*tZF`1Tx2_YCN6De61dn>PM?K;#&2e%aQOb z({0EcOV6jz;4!o)IpUX+xM$9L#{Ix8wBKH#K(rqI9A~UdR0nyZ(fPhPU5Cu&6Srnh$7yyom3Qw$ z9z{mKr`A4r-9fyIS}f@4Sb6tAP3qq#;;UxK+A=>LOZ{x%0~P(iW?I?0mxh10iqZ!* zryhF<-E0^fxb4RJhDQ=s>->pxwYP5h6%C(gru2r1)|IU<(eO!JbLTeH?PbN9c2{t7$m1u$bQRAPpxV$8axU z8`Dj?jWlBYA=1XlMr{ue<2Mm|TWE*>FC%tmxw!|}e;Tn*FEeq_pBEzblMUMb8vN%X z_BLZrqun1w>`uM$hy5_@ieWXSx8Yt=r)zHw@AGNc+ThcP_6|ks*XsIDplm8)pRO@> z^yA@({UqWjj`06l#NKA?o$&uk#O_pS|1MI6KsejmUVLrK>YsIMwZPuW* z%O~zd)I0PHUjpU}8}TZMuemi&7TVBK34AQo`A#bS;d|?ReQT+|ZZRx3@4`xZF?}~W zD&iVlwTnJoY)3q{hy6Y8ukB$wmc_r1l&hAZZt9(nYxL09^|I8P3vAyV9&x>lOPOMU zzrn~J9moZ)KjgsX7e`7N*Y3;ZU9w>mW*VAT+xd<*(G<#b%I+I^>wO0 zL{Z7T;ondxNY4EGhf_*@Rz8^JaxiH@=45^g#_&y}u`8>52mv7=1cZPP5C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