| Crates.io | tree-sitter-merlin6502 |
| lib.rs | tree-sitter-merlin6502 |
| version | 4.0.0 |
| created_at | 2022-10-30 14:36:42.565367+00 |
| updated_at | 2025-08-03 20:05:13.789091+00 |
| description | parser for merlin assembly language |
| homepage | |
| repository | https://github.com/dfgordon/tree-sitter-merlin6502 |
| max_upload_size | |
| id | 701486 |
| size | 1,841,976 |
This is the node binding for tree-sitter-merlin6502. See the main README here.
Here is a sample package.json:
{
"name": "parsing-example",
"version": "1.0.0",
"description": "merlin parsing example",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"tree-sitter": "^0.21.1",
"@dfgordon/tree-sitter-merlin6502": "^3.0.1"
}
}
You will also need .npmrc in the same directory:
@dfgordon:registry=https://npm.pkg.github.com
With an example index.js as follows:
const Parser = require('tree-sitter');
const Merlin = require('tree-sitter-merlin6502');
const code = 'my_label lda #$00"\n';
const parser = new Parser();
parser.setLanguage(Merlin);
tree = parser.parse(code);
console.log(tree.rootNode.toString());
This should print the syntax tree
(source_file (operation (label_def (global_label)) (op_lda) (arg_lda (imm (imm_prefix) (num)))))
For more on parsing with node, see the general guidance here.