Fix precedence for python multi-comments

This commit is contained in:
Zachary Yedidia
2017-03-26 17:24:02 -04:00
parent 89d1f1c202
commit 1655fde09b
5 changed files with 48 additions and 48 deletions

View File

@@ -18,18 +18,6 @@ rules:
# Parenthetical Color
- symbol.brackets: "[(){}]|\\[|\\]"
- constant.string:
start: "\""
end: "(?<!\\\\)\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "(?<!\\\\)'"
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "\"\"\""
end: "\"\"\""
@@ -42,6 +30,18 @@ rules:
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "\""
end: "(?<!\\\\)\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "(?<!\\\\)'"
rules:
- constant.specialChar: "\\\\."
- comment:
start: "#"
end: "$"

View File

@@ -32,6 +32,18 @@ rules:
- constant: "\\b[0-9]+\\b"
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
- comment:
start: "\"\"\""
end: "\"\"\""
rules:
- todo: "(TODO|XXX|FIXME):?"
- comment:
start: "'''"
end: "'''"
rules:
- todo: "(TODO|XXX|FIXME):?"
- constant.string:
start: "\""
end: "(?<!\\\\)\""
@@ -55,15 +67,3 @@ rules:
rules:
- todo: "(TODO|XXX|FIXME):?"
- comment:
start: "\"\"\""
end: "\"\"\""
rules:
- todo: "(TODO|XXX|FIXME):?"
- comment:
start: "'''"
end: "'''"
rules:
- todo: "(TODO|XXX|FIXME):?"

View File

@@ -29,6 +29,16 @@ rules:
# numbers
- constant.number: "\\b[0-9]+\\b"
- comment:
start: "\"\"\""
end: "\"\"\""
rules: []
- comment:
start: "'''"
end: "'''"
rules: []
- constant.string:
start: "\""
end: "(?<!\\\\)\""
@@ -46,13 +56,3 @@ rules:
end: "$"
rules: []
- comment:
start: "\"\"\""
end: "\"\"\""
rules: []
- comment:
start: "'''"
end: "'''"
rules: []

View File

@@ -28,6 +28,16 @@ rules:
# numbers
- constant.number: "\\b[0-9]+\\b"
- comment:
start: "\"\"\""
end: "\"\"\""
rules: []
- comment:
start: "'''"
end: "'''"
rules: []
- constant.string:
start: "\""
end: "(?<!\\\\)\""
@@ -45,13 +55,3 @@ rules:
end: "$"
rules: []
- comment:
start: "\"\"\""
end: "\"\"\""
rules: []
- comment:
start: "'''"
end: "'''"
rules: []