Skip to content

Instantly share code, notes, and snippets.

@Maumagnaguagno
Last active November 30, 2023 21:11
Show Gist options
  • Save Maumagnaguagno/4cfd987a368d581ea4b6 to your computer and use it in GitHub Desktop.
Save Maumagnaguagno/4cfd987a368d581ea4b6 to your computer and use it in GitHub Desktop.

Ace

Ace PDDL

define(function(require, exports, module) {
  "use strict";
  var oop = require("../lib/oop");
  var PDDLHighlightRules = function() {
    var keywordMapper = this.createKeywordMapper({
      "keyword.operator": "not|and|or|when|forall|exists|either",
      "constant.language": "define|domain|problem"
    }, "identifier", true);
    this.$rules = {"start": [
      {token: "comment", regex: ";.*"},
      {token: "variable", regex: "\\?[\\w-]+\\b"},
      {token: "constant.language", regex: ":[\\w-]+"},
      {token: "constant.numeric", regex: "[+-]?\\d+(?:.\\d*)?\\b"},
      {token: keywordMapper, regex: "[:a-zA-Z_$][-\\w$]*\\b"}
    ]};
  };
  oop.inherits(PDDLHighlightRules, require("./text_highlight_rules").TextHighlightRules);
  exports.PDDLHighlightRules = PDDLHighlightRules;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment