Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CodeMirror.defineSimpleMode('human_resource_machine', {
// The start state contains the rules that are intially used
start: [
// Possible header.
{
regex: /^-- HUMAN RESOURCE MACHINE PROGRAM --$/,
token: 'string'
},
// Comment definition.
{
regex: /^(DEFINE COMMENT)( )(\d+)$/,
token: ['keyword', null, 'number'],
next: 'comment'
},
// Commands.
{
regex: /([A-Z]+)( +)([0-9a-z]+)?/,
token: ['keyword', null, 'number']
}
],
// The comment block.
comment: [
{regex: /;$/, token: 'comment', next: 'start'},
{regex: /[^;]*/, token: 'comment'}
]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.