prism-bbj.js 978 B

12345678910111213141516171819
  1. (function (Prism) {
  2. Prism.languages.bbj = {
  3. 'comment': {
  4. pattern: /(^|[^\\:])rem\s+.*/i,
  5. lookbehind: true,
  6. greedy: true
  7. },
  8. 'string': {
  9. pattern: /(['"])(?:(?!\1|\\).|\\.)*\1/,
  10. greedy: true
  11. },
  12. 'number': /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,
  13. 'keyword': /\b(?:abstract|all|argc|begin|bye|callback|case|chn|class|classend|ctl|day|declare|delete|dim|dom|dread|dsz|else|end|endif|err|exitto|extends|fi|field|for|from|gosub|goto|if|implements|interface|interfaceend|iol|iolist|let|list|load|method|methodend|methodret|on|opts|pfx|print|private|process_events|protected|psz|public|read|read_resource|release|remove_callback|repeat|restore|return|rev|seterr|setesc|sqlchn|sqlunt|ssn|start|static|swend|switch|sys|then|tim|unt|until|use|void|wend|where|while)\b/i,
  14. 'function': /\b\w+(?=\()/,
  15. 'boolean': /\b(?:BBjAPI\.TRUE|BBjAPI\.FALSE)\b/i,
  16. 'operator': /<[=>]?|>=?|[+\-*\/^=&]|\b(?:and|not|or|xor)\b/i,
  17. 'punctuation': /[.,;:()]/
  18. };
  19. }(Prism));