| def name = "Guillaume" |
| def date = "April, 1st" |
| |
| def dollarSlashy = $/ |
| Hello $name, |
| today we're ${date}. |
| |
| $ dollar sign |
| $$ escaped dollar sign |
| \ backslash |
| / forward slash |
| $/ escaped forward slash |
| $/$ escaped dollar slashy string delimiter |
| /$ |
| |
| assert [ |
| 'Guillaume', |
| 'April, 1st', |
| '$ dollar sign', |
| '$ escaped dollar sign', |
| '\\ backslash', |
| '/ forward slash', |
| '$/ escaped forward slash', |
| '/$ escaped dollar slashy string delimiter' |
| |
| ].each { dollarSlashy.contains(it) } |
| ----- |
| Groovy script |
| Variable definitions |
| Modifiers |
| PsiElement(def)('def') |
| PsiWhiteSpace(' ') |
| Variable |
| PsiElement(identifier)('name') |
| PsiWhiteSpace(' ') |
| PsiElement(=)('=') |
| PsiWhiteSpace(' ') |
| Literal |
| PsiElement(Gstring)('"Guillaume"') |
| PsiElement(new line)('\n') |
| Variable definitions |
| Modifiers |
| PsiElement(def)('def') |
| PsiWhiteSpace(' ') |
| Variable |
| PsiElement(identifier)('date') |
| PsiWhiteSpace(' ') |
| PsiElement(=)('=') |
| PsiWhiteSpace(' ') |
| Literal |
| PsiElement(Gstring)('"April, 1st"') |
| PsiElement(new line)('\n\n') |
| Variable definitions |
| Modifiers |
| PsiElement(def)('def') |
| PsiWhiteSpace(' ') |
| Variable |
| PsiElement(identifier)('dollarSlashy') |
| PsiWhiteSpace(' ') |
| PsiElement(=)('=') |
| PsiWhiteSpace(' ') |
| Compound regular expression |
| PsiElement($/ regex begin)('$/') |
| GrStringContentImpl(GString content element) |
| PsiElement($/ regex content)('\n Hello ') |
| GString injection |
| PsiElement($)('$') |
| Reference expression |
| PsiElement(identifier)('name') |
| GrStringContentImpl(GString content element) |
| PsiElement($/ regex content)(',\n today we're ') |
| GString injection |
| PsiElement($)('$') |
| Closable block |
| PsiElement({)('{') |
| Parameter list |
| <empty list> |
| Reference expression |
| PsiElement(identifier)('date') |
| PsiElement(})('}') |
| GrStringContentImpl(GString content element) |
| PsiElement($/ regex content)('.\n\n $ dollar sign\n $$ escaped dollar sign\n \ backslash\n / forward slash\n $/ escaped forward slash\n $/$ escaped dollar slashy string delimiter\n') |
| PsiElement($/ regex end)('/$') |
| PsiElement(new line)('\n\n') |
| ASSERT statement |
| PsiElement(assert)('assert') |
| PsiWhiteSpace(' ') |
| Method call |
| Reference expression |
| Generalized list |
| PsiElement([)('[') |
| PsiWhiteSpace('\n ') |
| Literal |
| PsiElement(string)(''Guillaume'') |
| PsiElement(,)(',') |
| PsiWhiteSpace('\n ') |
| Literal |
| PsiElement(string)(''April, 1st'') |
| PsiElement(,)(',') |
| PsiWhiteSpace('\n ') |
| Literal |
| PsiElement(string)(''$ dollar sign'') |
| PsiElement(,)(',') |
| PsiWhiteSpace('\n ') |
| Literal |
| PsiElement(string)(''$ escaped dollar sign'') |
| PsiElement(,)(',') |
| PsiWhiteSpace('\n ') |
| Literal |
| PsiElement(string)(''\\ backslash'') |
| PsiElement(,)(',') |
| PsiWhiteSpace('\n ') |
| Literal |
| PsiElement(string)(''/ forward slash'') |
| PsiElement(,)(',') |
| PsiWhiteSpace('\n') |
| Literal |
| PsiElement(string)(''$/ escaped forward slash'') |
| PsiElement(,)(',') |
| PsiWhiteSpace('\n') |
| Literal |
| PsiElement(string)(''/$ escaped dollar slashy string delimiter'') |
| PsiWhiteSpace('\n\n') |
| PsiElement(])(']') |
| PsiElement(.)('.') |
| PsiElement(identifier)('each') |
| PsiWhiteSpace(' ') |
| Arguments |
| <empty list> |
| Closable block |
| PsiElement({)('{') |
| PsiWhiteSpace(' ') |
| Parameter list |
| <empty list> |
| Method call |
| Reference expression |
| Reference expression |
| PsiElement(identifier)('dollarSlashy') |
| PsiElement(.)('.') |
| PsiElement(identifier)('contains') |
| Arguments |
| PsiElement(()('(') |
| Reference expression |
| PsiElement(identifier)('it') |
| PsiElement())(')') |
| PsiWhiteSpace(' ') |
| PsiElement(})('}') |