mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-09-06 00:47:15 -04:00
Merge pull request #7 from amrnt/master
fix python syntax to prioritize multi liner comments
This commit is contained in:
+12
-12
@@ -29,18 +29,6 @@ rules:
|
|||||||
# numbers
|
# numbers
|
||||||
- constant.number: "\\b[0-9]+\\b"
|
- constant.number: "\\b[0-9]+\\b"
|
||||||
|
|
||||||
- constant.string:
|
|
||||||
start: "\""
|
|
||||||
end: "\""
|
|
||||||
rules:
|
|
||||||
- constant.specialChar: "\\\\."
|
|
||||||
|
|
||||||
- constant.string:
|
|
||||||
start: "'"
|
|
||||||
end: "'"
|
|
||||||
rules:
|
|
||||||
- constant.specialChar: "\\\\."
|
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "#"
|
start: "#"
|
||||||
end: "$"
|
end: "$"
|
||||||
@@ -55,3 +43,15 @@ rules:
|
|||||||
start: "'''"
|
start: "'''"
|
||||||
end: "'''"
|
end: "'''"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|||||||
+14
-14
@@ -16,9 +16,9 @@ rules:
|
|||||||
# types
|
# types
|
||||||
- type: "\\b(bool|bytearray|bytes|classmethod|complex|dict|enumerate|filter|float|frozenset|int|list|map|memoryview|object|property|range|reversed|set|slice|staticmethod|str|super|tuple|type|zip)\\b"
|
- type: "\\b(bool|bytearray|bytes|classmethod|complex|dict|enumerate|filter|float|frozenset|int|list|map|memoryview|object|property|range|reversed|set|slice|staticmethod|str|super|tuple|type|zip)\\b"
|
||||||
# definitions
|
# definitions
|
||||||
- identifier: "def [a-zA-Z_0-9]+"
|
- identifier: "def [a-zA-Z_0-9]+"
|
||||||
# keywords
|
# keywords
|
||||||
- statement: "\\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|raise|return|try|while|with|yield)\\b"
|
- statement: "\\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|raise|return|try|while|with|yield)\\b"
|
||||||
# decorators
|
# decorators
|
||||||
- brightgreen: "@.*[(]"
|
- brightgreen: "@.*[(]"
|
||||||
# operators
|
# operators
|
||||||
@@ -28,18 +28,6 @@ rules:
|
|||||||
# numbers
|
# numbers
|
||||||
- constant.number: "\\b[0-9]+\\b"
|
- constant.number: "\\b[0-9]+\\b"
|
||||||
|
|
||||||
- constant.string:
|
|
||||||
start: "\""
|
|
||||||
end: "\""
|
|
||||||
rules:
|
|
||||||
- constant.specialChar: "\\\\."
|
|
||||||
|
|
||||||
- constant.string:
|
|
||||||
start: "'"
|
|
||||||
end: "'"
|
|
||||||
rules:
|
|
||||||
- constant.specialChar: "\\\\."
|
|
||||||
|
|
||||||
- comment:
|
- comment:
|
||||||
start: "#"
|
start: "#"
|
||||||
end: "$"
|
end: "$"
|
||||||
@@ -54,3 +42,15 @@ rules:
|
|||||||
start: "'''"
|
start: "'''"
|
||||||
end: "'''"
|
end: "'''"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|||||||
Reference in New Issue
Block a user