1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-10 13:25:25 +03:00

Fixing strings in Dart

1. Deleted back-tick strings which are not a valid Dart syntax
2. Added string interpolation for ${}
3. NOT adding string interpolation for $var as this is considered a bad practice
This commit is contained in:
Yerlan 2021-05-19 22:44:27 +02:00 committed by GitHub
parent 38f85706ff
commit 48a07888de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,14 +39,19 @@ provide-module dart %§
add-highlighter shared/dart regions
add-highlighter shared/dart/code default-region group
add-highlighter shared/dart/back_string region '`' '`' fill string
add-highlighter shared/dart/double_string region '"' (?<!\\)(\\\\)*" fill string
add-highlighter shared/dart/single_string region "'" (?<!\\)(\\\\)*' fill string
add-highlighter shared/dart/double_string region '"' (?<!\\)(\\\\)*" group
add-highlighter shared/dart/single_string region "'" (?<!\\)(\\\\)*' group
add-highlighter shared/dart/comment region /\* \*/ fill comment
add-highlighter shared/dart/comment_line region '//' $ fill comment
add-highlighter shared/dart/code/ regex %{-?([0-9]*\.(?!0[xX]))?\b([0-9]+|0[xX][0-9a-fA-F]+)\.?([eE][+-]?[0-9]+)?i?\b} 0:value
# String interpolation
add-highlighter shared/dart/double_string/ fill string
add-highlighter shared/dart/double_string/ regex \$\{.*?\} 0:value
add-highlighter shared/dart/single_string/ fill string
add-highlighter shared/dart/single_string/ regex \$\{.*?\} 0:value
evaluate-commands %sh{
# Grammar
keywords="abstract|do|import|super|as|in|switch|assert|else|interface|async"