1
0
mirror of https://github.com/emkay/parser-6502.git synced 2024-12-22 06:29:27 +00:00
parser-6502/index.js
Michael Matuzak 8a077f9d66 first
2016-10-02 14:54:14 -07:00

24 lines
478 B
JavaScript

const mona = require('mona')
const directive = require('./parsers/directive')
const instruction = require('./parsers/instruction')
const label = require('./parsers/label')
function assembler (input) {
return mona.parse(
mona.collect(
mona.or(
directive(),
instruction(),
label(),
mona.eol()
)
),
input
)
}
module.exports = assembler
// const result = mona.parse(mona.collect(assembler()), c)
// console.log(result)