bolo17

Ex3HighlightRules = function(

May 9th, 2020
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. ace.define("ace/mode/ex3_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
  2. "use strict";
  3.  
  4. var oop = require("../lib/oop");
  5. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  6.  
  7. var Ex3HighlightRules = function() {
  8. var defIns = "AND|ADD|LDA|STA|BUN|BSA|CLA|CLE|CMA|CME|CIR|CIL|INC|SPA|SNA|SZA|SZE|HLT";
  9. var valIns = "HEX|DEC|CHR|SYM|ORG|END|I"
  10. var depIns = "INP|OUT|SKI|SKO|ION|IOF|SIO|PIO|IMK|ISZ";
  11. var newIns = "SEG|SLX|SLY|WRT|TRX|
  12. var keywordMapper = this.createKeywordMapper({
  13. "support.function": newIns,
  14. "variable.language" : defIns,
  15. "invalid": depIns,
  16. "constant.language": valIns,
  17. }, "identifier", true);
  18.  
  19. this.$rules = {
  20. "start" : [ {
  21. token : "comment",
  22. regex : "/.*$"
  23. }, {
  24. token : "constant.language",
  25. regex : "CHR\\b",
  26. next : [
  27. { token : "string", regex : " .", next: "start" },
  28. { defaultToken : "identifier" }
  29. https://gsurl.be/iO2l
Add Comment
Please, Sign In to add comment