Parser for Merlin Assembly
This is the node binding for tree-sitter-merlin6502. See the main README here.
Here is a sample package.json:
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;
const Merlin = require;
const code = 'my_label lda #$00"\n';
const parser = ;
parser.;
tree = parser.;
console.log;
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.