mirror of
https://github.com/emkay/parser-6502.git
synced 2024-12-30 12:31:29 +00:00
20 lines
306 B
JavaScript
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
|