1
0
mirror of https://github.com/emkay/parser-6502.git synced 2024-12-22 06:29:27 +00:00
parser-6502/parsers/label.js

20 lines
306 B
JavaScript
Raw Normal View History

2016-10-02 21:54:14 +00:00
const mona = require('mona')
function label () {
return mona.sequence((s) => {
2016-10-12 00:01:15 +00:00
const label = s(
mona.followedBy(
mona.text(mona.alphanum(), {min: 1}),
mona.string(':'),
mona.eol()
)
)
2016-10-02 21:54:14 +00:00
return mona.value({
2016-10-12 00:01:15 +00:00
label
2016-10-02 21:54:14 +00:00
})
})
}
module.exports = label