mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 14:47:16 +09:00
Raku syntax: Fix strings and comments (#2311)
* Raku syntax: Fix strings and comments Problematic code: my @array1 = [ "'", "a", "b" ]; my @array2 = [ '"', 'a', 'b' ]; my @array3 = [ "#", "a", "b" ]; I deleted "default" because it was breaking comments with urls after of my changes. Some parts were taken from: https://github.com/hankache/raku.nanorc/blob/master/raku.nanorc * Raku syntax: fix strings Code: sub xyz(Str is encoded('utf8')) returns int32 is native('asdf') { * } sub xyz(Str is encoded("utf8")) returns int32 is native("asdf") { * } From python3.yaml
This commit is contained in:
committed by
GitHub
parent
580c32bcef
commit
a2d83132ca
@@ -12,14 +12,29 @@ rules:
|
|||||||
- identifier: "[$@%&](\\.|!|^)?([[:alpha:]]|_)([[:alnum:]]|-|_)*([[:alnum:]]|_)"
|
- identifier: "[$@%&](\\.|!|^)?([[:alpha:]]|_)([[:alnum:]]|-|_)*([[:alnum:]]|_)"
|
||||||
- identifier: "[$@%&](\\?|\\*)([A-Z])([A-Z]|-)*([A-Z])"
|
- identifier: "[$@%&](\\?|\\*)([A-Z])([A-Z]|-)*([A-Z])"
|
||||||
|
|
||||||
- constant.string: "\".*\"|qq\\|.*\\|"
|
- comment: "#\ [^`|=]*"
|
||||||
- default: "[sm]/.*/"
|
- comment: "#[:alnum:].*"
|
||||||
|
- comment: "^#!/.*"
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "\""
|
||||||
|
end: "\""
|
||||||
|
skip: "\\\\."
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
|
- constant.string:
|
||||||
|
start: "'"
|
||||||
|
end: "'"
|
||||||
|
skip: "\\\\."
|
||||||
|
rules:
|
||||||
|
- constant.specialChar: "\\\\."
|
||||||
|
|
||||||
- preproc:
|
- preproc:
|
||||||
start: "(^use| = new)"
|
start: "(^use| = new)"
|
||||||
end: ";"
|
end: ";"
|
||||||
rules: []
|
rules: []
|
||||||
|
|
||||||
- comment: "#.*"
|
|
||||||
- identifier.macro:
|
- identifier.macro:
|
||||||
start: "<<EOSQL"
|
start: "<<EOSQL"
|
||||||
end: "EOSQL"
|
end: "EOSQL"
|
||||||
|
|||||||
Reference in New Issue
Block a user