// Monarch syntax highlighting for the minilogo language. export default { keywords: [ 'color','def','down','for','move','pen','to','up' ], operators: [ '*','+',',','-','/','=' ], symbols: /\(|\)|\*|\+|,|-|\/|=|\{|\}/, tokenizer: { initial: [ { regex: /#(\d|[a-fA-F]){3,6}/, action: {"token":"string"} }, { regex: /[_a-zA-Z][\w_]*/, action: { cases: { '@keywords': {"token":"keyword"}, '@default': {"token":"string"} }} }, { regex: /(?:(?:-?[0-9]+)?\.[0-9]+)|-?[0-9]+/, action: {"token":"number"} }, { include: '@whitespace' }, { regex: /@symbols/, action: { cases: { '@operators': {"token":"operator"}, '@default': {"token":""} }} }, ], whitespace: [ { regex: /\s+/, action: {"token":"white"} }, { regex: /\/\*/, action: {"token":"comment","next":"@comment"} }, { regex: /\/\/[^\n\r]*/, action: {"token":"comment"} }, ], comment: [ { regex: /[^/\*]+/, action: {"token":"comment"} }, { regex: /\*\//, action: {"token":"comment","next":"@pop"} }, { regex: /[/\*]/, action: {"token":"comment"} }, ], } };