1
0
mirror of https://github.com/emkay/parser-6502.git synced 2024-12-30 12:31:29 +00:00
parser-6502/parsers/label.js
2016-10-11 17:01:15 -07:00

20 lines
306 B
JavaScript

const mona = require('mona')
function label () {
return mona.sequence((s) => {
const label = s(
mona.followedBy(
mona.text(mona.alphanum(), {min: 1}),
mona.string(':'),
mona.eol()
)
)
return mona.value({
label
})
})
}
module.exports = label