tree-sitter-merlin6502

Crates.iotree-sitter-merlin6502
lib.rstree-sitter-merlin6502
version4.0.0
created_at2022-10-30 14:36:42.565367+00
updated_at2025-08-03 20:05:13.789091+00
descriptionparser for merlin assembly language
homepage
repositoryhttps://github.com/dfgordon/tree-sitter-merlin6502
max_upload_size
id701486
size1,841,976
(dfgordon)

documentation

README

Parser for Merlin Assembly

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.

Commit count: 21

cargo fmt