Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ec66af9

Browse files
committed
Groovy REPL: highlight triple-quoted strings
1 parent abf8d94 commit ec66af9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

demo/src/main/scripts/groovy.nanorc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ color green,,faint "(([a-z]{2,}[.]{1}){2,10}([a-z]{2,}){0,1})"
77
color green,,faint "\<(print|println|sleep)\>"
88
color green "\<[A-Z]{0,2}([A-Z]{1}[a-z]+){1,}\>"
99
color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>"
10-
color red ""[^"]*""
10+
# Mono-quoted strings.
11+
color brightgreen "'([^'\\]|\\.)*'|'''"
12+
color brightgreen ""([^"\\]|\\.)*"|""""
13+
color normal "'''|""""
14+
# Triple-quoted strings.
15+
color brightgreen start="'''([^'),]|$)" end="(^|[^(\\])'''"
16+
color brightgreen start=""""([^"),]|$)" end="(^|[^(\\])""""
17+
#
1118
color yellow "\<(true|false|null)\>"
1219
color yellow "\<[A-Z]+([_]{1}[A-Z]+){0,}\>"
1320
icolor yellow "\b(([1-9][0-9]+)|0+)\.[0-9]+\b" "\b[1-9][0-9]*\b" "\b0[0-7]*\b" "\b0x[1-9a-f][0-9a-f]*\b"

0 commit comments

Comments
 (0)