This is a parser written in javascript that will parse assembler written for the 6502 8-bit microprocessor.
const fs = require('fs')
const parser = require('parser-6502')
const input = fs.readFileSync('./asm.s', 'utf-8')
const result = parser(input)
console.log(result)
[
{
"directive": ".db",
"args": [
{
"binary": "00000001"
}
]
}
]
npm i parser-6502
MIT