@@ -54,8 +54,8 @@ private val variantTypes = listOf(
5454fun createGdscriptGrammar () = grammar(
5555 " gdscript" ,
5656 token(" comment" , pattern(compile(" #.*\\ n" ))),
57- token(" double-quote-string" , pattern(compile(" r?\" (?:[^\"\\\\ ]|\\\\ .)*+\" " ), false , true , " string" )),
58- token(" single-quote-string" , pattern(compile(" r?\' (?:[^\'\\\\ ]|\\\\ .)*+\' " ), false , true , " string" )),
57+ token(" double-quote-string" , pattern(compile(" &? \\ ^? r?\" (?:[^\"\\\\ ]|\\\\ .)*+\" " ), false , true , " string" )),
58+ token(" single-quote-string" , pattern(compile(" &? \\ ^? r?\' (?:[^\'\\\\ ]|\\\\ .)*+\' " ), false , true , " string" )),
5959 token(" triple-double-quote-string" , pattern(compile(" r?(\" {3,}).*?\\ 1" ), false , true , " string" )),
6060 token(" triple-single-quote-string" , pattern(compile(" r?(\' {3,}).*?\\ 1" ), false , true , " string" )),
6161 token(" annotation" , pattern(compile(" @$identifier " ), false , true )),
@@ -66,7 +66,7 @@ fun createGdscriptGrammar() = grammar(
6666 ),
6767 token(
6868 " number" ,
69- pattern(compile(" -?(?:0x (?:[0-9a-fA-F]_?)+|0b (?:[01]_?)+|(?:(?: [0-9]_?)*\\ .(?:[0-9]_?)+) (?:e -?(?:[0-9]_?)+)?|(?:[0-9]_?)+\\ .?(?:e -?(?:[0-9]_?)+)?)" ))
69+ pattern(compile(" -?(?:0[xX] (?:[0-9a-fA-F]_?)+|0[bB] (?:[01]_?)+|(?:[0-9]_?)*\\ .(?:[0-9]_?)+(?:[eE] -?(?:[0-9]_?)+)?|(?:[0-9]_?)+\\ .?(?:[eE] -?(?:[0-9]_?)+)?)" ))
7070 ),
7171 token(" operator" , pattern(compile(" =|\\ +=|-=|\\ *\\ *=|\\ *=|/=|%=|&=|\\ ^=|<<=|>>=|:\\ s*=|->" ))),
7272 token(
0 commit comments