1
0
mirror of https://github.com/emkay/parser-6502.git synced 2024-12-21 15:29:19 +00:00
parser-6502/index.js

22 lines
396 B
JavaScript
Raw Normal View History

2016-10-02 21:54:14 +00:00
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(),
2016-10-12 01:09:19 +00:00
mona.eol()
2016-10-02 21:54:14 +00:00
)
),
input
)
}
module.exports = assembler