mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-25 18:07:07 +09:00
Fix Ocaml syntax highlighting (#3427)
* Fix (kinda) Ocaml syntax highlighting * Remove functions rule * Highlight character with escape sequence * Add suggested changes
This commit is contained in:
@@ -17,20 +17,18 @@ rules:
|
|||||||
- statement: "\\b(if|then|else)\\b"
|
- statement: "\\b(if|then|else)\\b"
|
||||||
#blocs
|
#blocs
|
||||||
- type: "\\b(begin|end|object|struct|sig|for|while|do|done|to|downto)\\b"
|
- type: "\\b(begin|end|object|struct|sig|for|while|do|done|to|downto)\\b"
|
||||||
|
- type: "'[0-9A-Za-z_]+"
|
||||||
#constantes
|
#constantes
|
||||||
- constant.bool: "\\b(true|false)\\b"
|
- constant.bool: "\\b(true|false)\\b"
|
||||||
#modules/classes
|
#modules/classes
|
||||||
- special: "\\b(include|inherit|initializer)\\b"
|
- special: "\\b(include|inherit|initializer)\\b"
|
||||||
#expr modifiers
|
#expr modifiers
|
||||||
- special: "\\b(new|ref|mutable|lazy|assert|raise)\\b"
|
- special: "\\b(new|ref|mutable|lazy|assert|raise)\\b"
|
||||||
- constant.string:
|
#character literal
|
||||||
start: "'"
|
- constant.string: "'(\\\\[0-7]{3}|\\\\x[A-Fa-f0-9]{2}|\\\\u[A-Fa-f0-9]{4}|\\\\U[A-Fa-f0-9]{8}|\\\\[abfnrtv'\\\"\\\\]|.)'"
|
||||||
end: "'"
|
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
||||||
skip: "\\\\."
|
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
||||||
rules:
|
#string literal
|
||||||
- constant.specialChar: "%."
|
|
||||||
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
||||||
- 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:
|
- constant.string:
|
||||||
start: "\""
|
start: "\""
|
||||||
end: "\""
|
end: "\""
|
||||||
|
|||||||
Reference in New Issue
Block a user