dollar-slash string can be the first lexeme of file

This commit is contained in:
Maxim.Medvedev
2011-12-11 12:54:32 +04:00
parent 25fbda0137
commit 897d5437ef
5 changed files with 1803 additions and 1770 deletions
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 /////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -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)('/$')