mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
dollar-slash string can be the first lexeme of file
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -664,6 +664,9 @@ mGSTRING_LITERAL = \"\"
|
||||
|
||||
{mGSTRING_LITERAL} { return mGSTRING_LITERAL; }
|
||||
|
||||
"$""/" { yypushback(2);
|
||||
yybegin(WAIT_FOR_REGEX); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////// keywords /////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
+2
@@ -157,6 +157,8 @@ public class ExpressionsParsingTest extends GroovyParsingTestCase {
|
||||
public void testregex$regex18() throws Throwable { doTest(); }
|
||||
public void testregex$regex19() throws Throwable { doTest(); }
|
||||
public void testregex$regex2() throws Throwable { doTest(); }
|
||||
public void testregex$regex20() throws Throwable { doTest(); }
|
||||
public void testregex$regex21() throws Throwable { doTest(); }
|
||||
public void testregex$regex3() throws Throwable { doTest(); }
|
||||
public void testregex$regex33() throws Throwable { doTest(); }
|
||||
public void testregex$regex4() throws Throwable { doTest(); }
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
print (/a\${2}/)
|
||||
-----
|
||||
Groovy script
|
||||
Method call
|
||||
Reference expression
|
||||
PsiElement(identifier)('print')
|
||||
PsiWhiteSpace(' ')
|
||||
Arguments
|
||||
PsiElement(()('(')
|
||||
Compound regular expression
|
||||
PsiElement(regex begin)('/')
|
||||
PsiElement(regex content)('a\${2}')
|
||||
PsiElement(regex end)('/')
|
||||
PsiElement())(')')
|
||||
@@ -0,0 +1,7 @@
|
||||
$/abc/$
|
||||
-----
|
||||
Groovy script
|
||||
Compound regular expression
|
||||
PsiElement($/ regex begin)('$/')
|
||||
PsiElement($/ regex content)('abc')
|
||||
PsiElement($/ regex end)('/$')
|
||||
Reference in New Issue
Block a user