Загрузка данных


{
  "$schema": "https://githubusercontent.com",
  "name": "LuxScript",
  "scopeName": "source.luxs",
  "patterns": [
    {
      "match": "(?<==)\\s*([a-zA-Z0-9_а-яА-ЯёЁ]+)",
      "captures": {
        "1": {
          "name": "constant.numeric.round-step.luxs"
        }
      }
    },
    {
      "match": "\\*[a-zA-Z0-9_а-яА-ЯёЁ]+\\b",
      "name": "constant.numeric.round-step.luxs"
    },
    {
      "match": "\\b(num|calc|calcrepeat|rand)\\b",
      "name": "keyword.control.generation.luxs"
    },
    {
      "match": "\\b(speed|invert|round)\\b",
      "name": "keyword.control.modifier.luxs"
    },
    {
      "match": "\\b(light|repeat|wait|stop)\\b",
      "name": "keyword.control.action.luxs"
    },
    {
      "match": "=",
      "name": "keyword.operator.assignment.luxs"
    },
    {
      "match": "[\\+\\-\\*/]",
      "name": "keyword.operator.arithmetic.luxs"
    },
    {
      "match": "[;(),]",
      "name": "punctuation.separator.luxs"
    },
    {
      "match": "\\b(1|0[.,]0*1)\\b",
      "name": "constant.numeric.round-step.luxs"
    },
    {
      "match": "\\b\\d+([.,]\\d+)?\\b",
      "name": "constant.numeric.luxs"
    }
  ]
}

{
  "Generation num": {
    "prefix": "num",
    "body": [
      "num = $1;"
    ]
  },
  "Generation calc": {
    "prefix": "calc",
    "body": [
      "calc($1)"
    ]
  },
  "Action light": {
    "prefix": "light",
    "body": [
      "light($1)"
    ]
  },
  "Action repeat": {
    "prefix": "repeat",
    "body": [
      "repeat ($1) {",
      "\t$0",
      "}"
    ]
  },
  "Action wait": {
    "prefix": "wait",
    "body": [
      "wait($1);"
    ]
  },
  "Action stop": {
    "prefix": "stop",
    "body": [
      "stop;"
    ]
  },
  "Modifier speed": {
    "prefix": "speed",
    "body": [
      "speed = $1;"
    ]
  }
}