more syntax;
authorwenzelm
Mon Jan 02 10:22:59 2017 +0100 (2017-01-02)
changeset 647450f002c15f3ab
parent 64744 ba0d4829d5f1
child 64746 34db87033abe
more syntax;
tuned;
src/Tools/VSCode/src/grammar.scala
     1.1 --- a/src/Tools/VSCode/src/grammar.scala	Mon Jan 02 09:41:25 2017 +0100
     1.2 +++ b/src/Tools/VSCode/src/grammar.scala	Mon Jan 02 10:22:59 2017 +0100
     1.3 @@ -52,7 +52,7 @@
     1.4    "fileTypes": ["thy"],
     1.5    "uuid": """ + JSON.Format(UUID.randomUUID().toString) + """,
     1.6    "repository": {
     1.7 -    "comments": {
     1.8 +    "comment": {
     1.9        "patterns": [
    1.10          {
    1.11            "name": "comment.block.isabelle",
    1.12 @@ -60,18 +60,37 @@
    1.13            "beginCaptures": {
    1.14              "0": { "name": "punctuation.definition.comment.begin.isabelle" }
    1.15            },
    1.16 -          "patterns": [{ "include": "#comments" }],
    1.17 +          "patterns": [{ "include": "#comment" }],
    1.18            "end": "\\*\\)",
    1.19            "endCaptures": {
    1.20              "0": { "name": "punctuation.definition.comment.end.isabelle" }
    1.21            }
    1.22          }
    1.23        ]
    1.24 +    },
    1.25 +    "cartouche": {
    1.26 +      "patterns": [
    1.27 +        {
    1.28 +          "name": "string.quoted.other.multiline.isabelle",
    1.29 +          "begin": "(?:\\\\<open>|‹)",
    1.30 +          "beginCaptures": {
    1.31 +            "0": { "name": "punctuation.definition.string.begin.isabelle" }
    1.32 +          },
    1.33 +          "patterns": [{ "include": "#cartouche" }],
    1.34 +          "end": "(?:\\\\<close>|›)",
    1.35 +          "endCaptures": {
    1.36 +            "0": { "name": "punctuation.definition.string.end.isabelle" }
    1.37 +          }
    1.38 +        }
    1.39 +      ]
    1.40      }
    1.41    },
    1.42    "patterns": [
    1.43      {
    1.44 -      "include": "#comments"
    1.45 +      "include": "#comment"
    1.46 +    },
    1.47 +    {
    1.48 +      "include": "#cartouche"
    1.49      },
    1.50      {
    1.51        "name": "keyword.control.isabelle",
    1.52 @@ -101,7 +120,7 @@
    1.53        },
    1.54        "patterns": [
    1.55          {
    1.56 -          "match": "\\\\.",
    1.57 +          "match": """ + JSON.Format("""\\[\"]|\\\d\d\d""") + """,
    1.58            "name": "constant.character.escape.isabelle"
    1.59          }
    1.60        ],
    1.61 @@ -109,6 +128,23 @@
    1.62        "endCaptures": {
    1.63          "0": { "name": "punctuation.definition.string.end.isabelle" }
    1.64        }
    1.65 +    },
    1.66 +    {
    1.67 +      "name": "string.quoted.backtick.isabelle",
    1.68 +      "begin": "`",
    1.69 +      "beginCaptures": {
    1.70 +        "0": { "name": "punctuation.definition.string.begin.isabelle" }
    1.71 +      },
    1.72 +      "patterns": [
    1.73 +        {
    1.74 +          "match": """ + JSON.Format("""\\[\`]|\\\d\d\d""") + """,
    1.75 +          "name": "constant.character.escape.isabelle"
    1.76 +        }
    1.77 +      ],
    1.78 +      "end": "`",
    1.79 +      "endCaptures": {
    1.80 +        "0": { "name": "punctuation.definition.string.end.isabelle" }
    1.81 +      }
    1.82      }
    1.83    ]
    1.84  }