Ignore Pattern Matching for Next Line


#1

Hi I have a pattern for detecting strings and highlighting it:

{
    name: "string.quoted.single.apdl"
    beginCaptures:
      "0":
        name: "punctuation.definition.string.begin.apdl"
    end: "'"
    comment: "single quoted string"
    endCaptures:
      "0":
        name: "punctuation.definition.string.end.apdl"
    begin: "'"
    patterns: [
      {
        name: "constant.character.escape.apdl"
        match: "\\\\'|\\\\\\\\"
      }
    ]
  }

But in after a line starting with *msg or *MSG the ' should be ignored. Is there a way to nest patterns? (I have to admit it is a little bit overwhelming, and I am happy for pointers!)


#2

You can indeed have a patterns[] array inside another patterns[].