mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 06:12:35 +09:00
Add support for skipping and remove need for lookbehind
This commit is contained in:
@@ -46,7 +46,7 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -74,13 +74,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- preproc: "..+"
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
@@ -90,13 +90,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -24,13 +24,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -27,13 +27,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- preproc: "..+"
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
@@ -10,7 +10,7 @@ rules:
|
||||
- constant.specialChar: "^\\s*}$"
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ rules:
|
||||
# String highlighting
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "(\\\\u[0-9A-fa-f]{4,4}|\\\\newline|\\\\space|\\\\tab|\\\\formfeed|\\\\backspace|\\\\return|\\\\.)"
|
||||
|
||||
|
||||
@@ -15,13 +15,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ detect:
|
||||
rules:
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules: []
|
||||
|
||||
- comment:
|
||||
|
||||
@@ -28,13 +28,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- preproc: "..+"
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
@@ -32,14 +32,14 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialchar: "\\\\."
|
||||
- special: "#\\{[^}]*\\}"
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules: []
|
||||
|
||||
- comment:
|
||||
|
||||
@@ -23,14 +23,14 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\([btnfr]|'|\\\"|\\\\)"
|
||||
- constant.specialChar: "\\\\u[A-Fa-f0-9]{4}"
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\([btnfr]|'|\\\"|\\\\)"
|
||||
- constant.specialChar: "\\\\u[A-Fa-f0-9]{4}"
|
||||
|
||||
@@ -24,12 +24,12 @@ rules:
|
||||
# Strings
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- special: "\"|'"
|
||||
|
||||
@@ -32,13 +32,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ rules:
|
||||
# Character literals
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
# Keywords
|
||||
@@ -52,13 +52,13 @@ rules:
|
||||
# DoubleQuotedString
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
# WysiwygString
|
||||
- constant.string:
|
||||
start: "r\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- constant.string:
|
||||
@@ -69,7 +69,7 @@ rules:
|
||||
# HexString
|
||||
- constant.string:
|
||||
start: "x\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
# DelimitedString
|
||||
|
||||
@@ -32,13 +32,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -22,13 +22,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -29,13 +29,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules: []
|
||||
|
||||
- comment:
|
||||
|
||||
@@ -43,13 +43,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -46,13 +46,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
||||
|
||||
|
||||
@@ -28,13 +28,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "%."
|
||||
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
||||
@@ -37,7 +37,7 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- error: "..+"
|
||||
- constant.specialChar: "%."
|
||||
|
||||
@@ -47,13 +47,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ rules:
|
||||
# Strings
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules: []
|
||||
|
||||
- default:
|
||||
|
||||
@@ -12,13 +12,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- preproc: "..+"
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
@@ -21,13 +21,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@ rules:
|
||||
- constant: "\\b(true|false)\\b"
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- statement: "\\\"(\\\\\"|[^\"])*\\\"[[:space:]]*:\" \"'(\\'|[^'])*'[[:space:]]*:"
|
||||
|
||||
@@ -10,12 +10,12 @@ rules:
|
||||
- special: "="
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- comment:
|
||||
|
||||
@@ -11,7 +11,7 @@ rules:
|
||||
- special: "[(){}<>]|\\[|\\]"
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- comment:
|
||||
|
||||
@@ -26,13 +26,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- identifier: "\\$+(\\{[^} ]+\\}|\\([^) ]+\\))"
|
||||
|
||||
@@ -15,7 +15,7 @@ rules:
|
||||
rules: []
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- constant.number: "#[0-9 A-F a-f]+"
|
||||
|
||||
@@ -34,13 +34,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "@\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- preproc:
|
||||
|
||||
@@ -41,13 +41,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -40,13 +40,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ rules:
|
||||
- statement: "\\b(def|object|case|trait|lazy|implicit|abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile|sealed)\\b"
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- constant: "\\b(true|false|null)\\b"
|
||||
|
||||
@@ -25,13 +25,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules: []
|
||||
|
||||
- comment:
|
||||
|
||||
@@ -28,12 +28,12 @@ rules:
|
||||
- todo: "TODO:?"
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -31,12 +31,12 @@ rules:
|
||||
- todo: "TODO:?"
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -12,13 +12,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
|
||||
@@ -35,13 +35,13 @@ rules:
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "(?<!\\\\)\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "(?<!\\\\)'"
|
||||
end: "'"
|
||||
rules: []
|
||||
|
||||
- comment:
|
||||
|
||||
Reference in New Issue
Block a user