Modified formatting and simplified multiline regex that broke vscode

This commit is contained in:
Matt Masson 2018-08-23 08:36:38 -04:00
Родитель 47c7dc4c5f
Коммит 5ecc7a0f02
2 изменённых файлов: 25 добавлений и 48 удалений

Просмотреть файл

@ -1,22 +1,23 @@
fileTypes:
- pq
- pqm
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: powerquery
scopeName: source.powerquery
fileTypes: [pq,pqm]
uuid: 41968B57-12E6-4AC5-92A4-A837010E8B0A
patterns:
- include: '#Noise'
- include: '#LiteralExpression'
- include: '#Keywords'
- include: '#ImplicitVariable'
- include: '#IntrinsicVariable'
- include: '#Operators'
- include: '#DotOperators'
- include: '#TypeName'
- include: '#RecordExpression'
- include: '#Punctuation'
- include: '#QuotedIdentifier'
- include: '#Identifier'
- include: '#Noise'
- include: '#LiteralExpression'
- include: '#Keywords'
- include: '#ImplicitVariable'
- include: '#IntrinsicVariable'
- include: '#Operators'
- include: '#DotOperators'
- include: '#TypeName'
- include: '#RecordExpression'
- include: '#Punctuation'
- include: '#QuotedIdentifier'
- include: '#Identifier'
repository:
Keywords:
@ -94,12 +95,12 @@ repository:
EscapeSequence:
begin: '#\('
beginCaptures:
'0':
name: punctuation.definition.escapesequence.begin.powerquery
'0':
name: punctuation.definition.escapesequence.begin.powerquery
end: \)
endCaptures:
'0':
name: punctuation.definition.escapesequence.end.powerquery
name: punctuation.definition.escapesequence.end.powerquery
patterns:
- match: '(#|\h{4}|\h{8}|cr|lf|tab)(?:,(#|\h{4}|\h{8}|cr|lf|tab))*'
- match: '[^\)]'
@ -136,7 +137,7 @@ repository:
'0':
name: inclusiveidentifier.powerquery
Identifier:
match: "(?x:\r\n # look-behind; identifier must not follow an identifier-part-char or a dot\r\n (?<![\\._\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Nd}\\p{Pc}\\p{Mn}\\p{Mc}\\p{Cf}])\r\n # Optional @ symbol\r\n (@?)\r\n\r\n # start of captured group\r\n (\r\n # identifier-start-character\r\n [_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}]\r\n # 0-or-more identifier-part-characters\r\n [_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Nd}\\p{Pc}\\p{Mn}\\p{Mc}\\p{Cf}]*\r\n \r\n # optionally followed by zero-or-more of this group\r\n (?:\r\n # dot\r\n \\.\r\n # identifier-start-character\r\n [_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}]\r\n # 0-or-more identifier-part-characters\r\n [_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Nd}\\p{Pc}\\p{Mn}\\p{Mc}\\p{Cf}]*\r\n )*\r\n # end of captured group, and word boundary\r\n ) \\b\r\n )"
match: "(?x:(?<![\\._\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Nd}\\p{Pc}\\p{Mn}\\p{Mc}\\p{Cf}])(@?)([_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}][_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Nd}\\p{Pc}\\p{Mn}\\p{Mc}\\p{Cf}]*(?:\\.[_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}][_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Nd}\\p{Pc}\\p{Mn}\\p{Mc}\\p{Cf}])*)\\b)"
captures:
'1':
name: keyword.operator.inclusiveidentifier.powerquery

Просмотреть файл

@ -2,15 +2,15 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>powerquery</string>
<key>scopeName</key>
<string>source.powerquery</string>
<key>fileTypes</key>
<array>
<string>pq</string>
<string>pqm</string>
</array>
<key>name</key>
<string>powerquery</string>
<key>scopeName</key>
<string>source.powerquery</string>
<key>uuid</key>
<string>41968B57-12E6-4AC5-92A4-A837010E8B0A</string>
<key>patterns</key>
@ -385,31 +385,7 @@
<key>Identifier</key>
<dict>
<key>match</key>
<string>(?x:&#xD;
# look-behind; identifier must not follow an identifier-part-char or a dot&#xD;
(?&lt;![\._\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}\p{Nl}\p{Nd}\p{Pc}\p{Mn}\p{Mc}\p{Cf}])&#xD;
# Optional @ symbol&#xD;
(@?)&#xD;
&#xD;
# start of captured group&#xD;
(&#xD;
# identifier-start-character&#xD;
[_\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}\p{Nl}]&#xD;
# 0-or-more identifier-part-characters&#xD;
[_\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}\p{Nl}\p{Nd}\p{Pc}\p{Mn}\p{Mc}\p{Cf}]*&#xD;
&#xD;
# optionally followed by zero-or-more of this group&#xD;
(?:&#xD;
# dot&#xD;
\.&#xD;
# identifier-start-character&#xD;
[_\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}\p{Nl}]&#xD;
# 0-or-more identifier-part-characters&#xD;
[_\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}\p{Nl}\p{Nd}\p{Pc}\p{Mn}\p{Mc}\p{Cf}]*&#xD;
)*&#xD;
# end of captured group, and word boundary&#xD;
) \b&#xD;
)</string>
<string>(?x:(?&lt;![\._\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}\p{Nl}\p{Nd}\p{Pc}\p{Mn}\p{Mc}\p{Cf}])(@?)([_\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}\p{Nl}][_\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}\p{Nl}\p{Nd}\p{Pc}\p{Mn}\p{Mc}\p{Cf}]*(?:\.[_\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}\p{Nl}][_\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}\p{Nl}\p{Nd}\p{Pc}\p{Mn}\p{Mc}\p{Cf}])*)\b)</string>
<key>captures</key>
<dict>
<key>1</key>