diff --git a/plugins/groovy/groovy-psi/gen/org/jetbrains/plugins/groovy/lang/parser/GroovyBnfParser.java b/plugins/groovy/groovy-psi/gen/org/jetbrains/plugins/groovy/lang/parser/GroovyBnfParser.java index 024c8b219fea..dea63fe24abc 100644 --- a/plugins/groovy/groovy-psi/gen/org/jetbrains/plugins/groovy/lang/parser/GroovyBnfParser.java +++ b/plugins/groovy/groovy-psi/gen/org/jetbrains/plugins/groovy/lang/parser/GroovyBnfParser.java @@ -2291,19 +2291,42 @@ public class GroovyBnfParser implements PsiParser, LightPsiParser { } /* ********************************************************** */ - // <> <> string_injection>> <> + // <> (<>>> | string_injection)* <> static boolean compound_string(PsiBuilder b, int l, Parser _begin, Parser _content, Parser _end) { if (!recursion_guard_(b, l, "compound_string")) return false; boolean r, p; Marker m = enter_section_(b, l, _NONE_); r = _begin.parse(b, l); p = r; // pin = 1 - r = r && report_error_(b, a_b_a(b, l + 1, _content, string_injection_parser_)); + r = r && report_error_(b, compound_string_1(b, l + 1, _content)); r = p && _end.parse(b, l) && r; exit_section_(b, l, m, r, p, null); return r || p; } + // (<>>> | string_injection)* + private static boolean compound_string_1(PsiBuilder b, int l, Parser _content) { + if (!recursion_guard_(b, l, "compound_string_1")) return false; + int c = current_position_(b); + while (true) { + if (!compound_string_1_0(b, l + 1, _content)) break; + if (!empty_element_parsed_guard_(b, "compound_string_1", c)) break; + c = current_position_(b); + } + return true; + } + + // <>>> | string_injection + private static boolean compound_string_1_0(PsiBuilder b, int l, Parser _content) { + if (!recursion_guard_(b, l, "compound_string_1_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = string_content(b, l + 1, _content); + if (!r) r = string_injection(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + /* ********************************************************** */ // constructor_identifier parse_parameter_list nl_throws [mb_nl lazy_constructor_block] public static boolean constructor(PsiBuilder b, int l) { @@ -2594,79 +2617,31 @@ public class GroovyBnfParser implements PsiParser, LightPsiParser { } /* ********************************************************** */ - // DOLLAR_SLASHY_CONTENT | empty_dollar_slashy_content - public static boolean dollar_slashy_content_inner(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "dollar_slashy_content_inner")) return false; - boolean r; - Marker m = enter_section_(b, l, _COLLAPSE_, STRING_CONTENT, null); - r = consumeTokenFast(b, DOLLAR_SLASHY_CONTENT); - if (!r) r = emptyStringContent(b, l + 1, DOLLAR_SLASHY_CONTENT); - exit_section_(b, l, m, r, false, null); - return r; - } - - /* ********************************************************** */ - // DOLLAR_SLASHY_BEGIN fast_dollar_slashy_content? DOLLAR_SLASHY_END | dollar_slashy_literal_pin + // DOLLAR_SLASHY_BEGIN fast_dollar_slashy_content? !'$' DOLLAR_SLASHY_END public static boolean dollar_slashy_literal(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "dollar_slashy_literal")) return false; if (!nextTokenIs(b, DOLLAR_SLASHY_BEGIN)) return false; - boolean r; - Marker m = enter_section_(b); - r = dollar_slashy_literal_0(b, l + 1); - if (!r) r = dollar_slashy_literal_pin(b, l + 1); - exit_section_(b, m, DOLLAR_SLASHY_LITERAL, r); - return r; - } - - // DOLLAR_SLASHY_BEGIN fast_dollar_slashy_content? DOLLAR_SLASHY_END - private static boolean dollar_slashy_literal_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "dollar_slashy_literal_0")) return false; - boolean r; - Marker m = enter_section_(b); - r = consumeToken(b, DOLLAR_SLASHY_BEGIN); - r = r && dollar_slashy_literal_0_1(b, l + 1); - r = r && consumeToken(b, DOLLAR_SLASHY_END); - exit_section_(b, m, null, r); - return r; - } - - // fast_dollar_slashy_content? - private static boolean dollar_slashy_literal_0_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "dollar_slashy_literal_0_1")) return false; - fast_dollar_slashy_content(b, l + 1); - return true; - } - - /* ********************************************************** */ - // DOLLAR_SLASHY_BEGIN (fast_dollar_slashy_content | <>) !'$' DOLLAR_SLASHY_END - static boolean dollar_slashy_literal_pin(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "dollar_slashy_literal_pin")) return false; - if (!nextTokenIs(b, DOLLAR_SLASHY_BEGIN)) return false; boolean r, p; - Marker m = enter_section_(b, l, _NONE_); + Marker m = enter_section_(b, l, _NONE_, DOLLAR_SLASHY_LITERAL, null); r = consumeToken(b, DOLLAR_SLASHY_BEGIN); - r = r && dollar_slashy_literal_pin_1(b, l + 1); - r = r && dollar_slashy_literal_pin_2(b, l + 1); + r = r && dollar_slashy_literal_1(b, l + 1); + r = r && dollar_slashy_literal_2(b, l + 1); p = r; // pin = 3 r = r && consumeToken(b, DOLLAR_SLASHY_END); exit_section_(b, l, m, r, p, null); return r || p; } - // fast_dollar_slashy_content | <> - private static boolean dollar_slashy_literal_pin_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "dollar_slashy_literal_pin_1")) return false; - boolean r; - Marker m = enter_section_(b); - r = fast_dollar_slashy_content(b, l + 1); - if (!r) r = string_content(b, l + 1, empty_dollar_slashy_content_parser_); - exit_section_(b, m, null, r); - return r; + // fast_dollar_slashy_content? + private static boolean dollar_slashy_literal_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "dollar_slashy_literal_1")) return false; + fast_dollar_slashy_content(b, l + 1); + return true; } // !'$' - private static boolean dollar_slashy_literal_pin_2(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "dollar_slashy_literal_pin_2")) return false; + private static boolean dollar_slashy_literal_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "dollar_slashy_literal_2")) return false; boolean r; Marker m = enter_section_(b, l, _NOT_); r = !consumeToken(b, T_DOLLAR); @@ -2675,9 +2650,9 @@ public class GroovyBnfParser implements PsiParser, LightPsiParser { } /* ********************************************************** */ - // <> + // <> static boolean dollar_slashy_string(PsiBuilder b, int l) { - return compound_string(b, l + 1, DOLLAR_SLASHY_BEGIN_parser_, dollar_slashy_content_inner_parser_, DOLLAR_SLASHY_END_parser_); + return compound_string(b, l + 1, DOLLAR_SLASHY_BEGIN_parser_, fast_dollar_slashy_content_parser_, DOLLAR_SLASHY_END_parser_); } /* ********************************************************** */ @@ -3213,6 +3188,12 @@ public class GroovyBnfParser implements PsiParser, LightPsiParser { return consumeTokenFast(b, SLASHY_CONTENT); } + /* ********************************************************** */ + // GSTRING_CONTENT + static boolean fast_string_content(PsiBuilder b, int l) { + return consumeTokenFast(b, GSTRING_CONTENT); + } + /* ********************************************************** */ // var public static boolean field(PsiBuilder b, int l) { @@ -3413,24 +3394,6 @@ public class GroovyBnfParser implements PsiParser, LightPsiParser { return true; } - /* ********************************************************** */ - // GSTRING_CONTENT | empty_gstring_content - public static boolean gstring_content_inner(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "gstring_content_inner")) return false; - boolean r; - Marker m = enter_section_(b, l, _COLLAPSE_, STRING_CONTENT, null); - r = consumeTokenFast(b, GSTRING_CONTENT); - if (!r) r = emptyStringContent(b, l + 1, GSTRING_CONTENT); - exit_section_(b, l, m, r, false, null); - return r; - } - - /* ********************************************************** */ - // GSTRING_END - static boolean gstring_end(PsiBuilder b, int l) { - return consumeToken(b, GSTRING_END); - } - /* ********************************************************** */ // 'if' after_if_keyword public static boolean if_statement(PsiBuilder b, int l) { @@ -5200,72 +5163,24 @@ public class GroovyBnfParser implements PsiParser, LightPsiParser { } /* ********************************************************** */ - // SLASHY_CONTENT | empty_slashy_content - public static boolean slashy_content_inner(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "slashy_content_inner")) return false; - boolean r; - Marker m = enter_section_(b, l, _COLLAPSE_, STRING_CONTENT, null); - r = consumeTokenFast(b, SLASHY_CONTENT); - if (!r) r = emptyStringContent(b, l + 1, SLASHY_CONTENT); - exit_section_(b, l, m, r, false, null); - return r; - } - - /* ********************************************************** */ - // SLASHY_BEGIN fast_slashy_content SLASHY_END | slashy_literal_pin + // SLASHY_BEGIN fast_slashy_content !'$' SLASHY_END public static boolean slashy_literal(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "slashy_literal")) return false; if (!nextTokenIs(b, SLASHY_BEGIN)) return false; - boolean r; - Marker m = enter_section_(b); - r = slashy_literal_0(b, l + 1); - if (!r) r = slashy_literal_pin(b, l + 1); - exit_section_(b, m, SLASHY_LITERAL, r); - return r; - } - - // SLASHY_BEGIN fast_slashy_content SLASHY_END - private static boolean slashy_literal_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "slashy_literal_0")) return false; - boolean r; - Marker m = enter_section_(b); + boolean r, p; + Marker m = enter_section_(b, l, _NONE_, SLASHY_LITERAL, null); r = consumeToken(b, SLASHY_BEGIN); r = r && fast_slashy_content(b, l + 1); - r = r && consumeToken(b, SLASHY_END); - exit_section_(b, m, null, r); - return r; - } - - /* ********************************************************** */ - // SLASHY_BEGIN (fast_slashy_content | <>) !'$' SLASHY_END - static boolean slashy_literal_pin(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "slashy_literal_pin")) return false; - if (!nextTokenIs(b, SLASHY_BEGIN)) return false; - boolean r, p; - Marker m = enter_section_(b, l, _NONE_); - r = consumeToken(b, SLASHY_BEGIN); - r = r && slashy_literal_pin_1(b, l + 1); - r = r && slashy_literal_pin_2(b, l + 1); + r = r && slashy_literal_2(b, l + 1); p = r; // pin = 3 r = r && consumeToken(b, SLASHY_END); exit_section_(b, l, m, r, p, null); return r || p; } - // fast_slashy_content | <> - private static boolean slashy_literal_pin_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "slashy_literal_pin_1")) return false; - boolean r; - Marker m = enter_section_(b); - r = fast_slashy_content(b, l + 1); - if (!r) r = string_content(b, l + 1, empty_slashy_content_parser_); - exit_section_(b, m, null, r); - return r; - } - // !'$' - private static boolean slashy_literal_pin_2(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "slashy_literal_pin_2")) return false; + private static boolean slashy_literal_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "slashy_literal_2")) return false; boolean r; Marker m = enter_section_(b, l, _NOT_); r = !consumeToken(b, T_DOLLAR); @@ -5274,9 +5189,9 @@ public class GroovyBnfParser implements PsiParser, LightPsiParser { } /* ********************************************************** */ - // <> + // <> static boolean slashy_string(PsiBuilder b, int l) { - return compound_string(b, l + 1, SLASHY_BEGIN_parser_, slashy_content_inner_parser_, SLASHY_END_parser_); + return compound_string(b, l + 1, SLASHY_BEGIN_parser_, fast_slashy_content_parser_, SLASHY_END_parser_); } /* ********************************************************** */ @@ -5396,9 +5311,9 @@ public class GroovyBnfParser implements PsiParser, LightPsiParser { public static boolean string_content(PsiBuilder b, int l, Parser _content) { if (!recursion_guard_(b, l, "string_content")) return false; boolean r; - Marker m = enter_section_(b, l, _COLLAPSE_, STRING_CONTENT, null); + Marker m = enter_section_(b); r = _content.parse(b, l); - exit_section_(b, l, m, r, false, null); + exit_section_(b, m, STRING_CONTENT, r); return r; } @@ -7061,13 +6976,13 @@ public class GroovyBnfParser implements PsiParser, LightPsiParser { return r; } - // <> + // <> public static boolean gstring(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "gstring")) return false; if (!nextTokenIsSmart(b, GSTRING_BEGIN)) return false; boolean r; Marker m = enter_section_(b); - r = compound_string(b, l + 1, GSTRING_BEGIN_parser_, gstring_content_inner_parser_, gstring_end_parser_); + r = compound_string(b, l + 1, GSTRING_BEGIN_parser_, fast_string_content_parser_, GSTRING_END_parser_); exit_section_(b, m, GSTRING, r); return r; } @@ -7107,7 +7022,12 @@ public class GroovyBnfParser implements PsiParser, LightPsiParser { }; final static Parser GSTRING_BEGIN_parser_ = new Parser() { public boolean parse(PsiBuilder b, int l) { - return consumeTokenSmart(b, GSTRING_BEGIN); + return consumeToken(b, GSTRING_BEGIN); + } + }; + final static Parser GSTRING_END_parser_ = new Parser() { + public boolean parse(PsiBuilder b, int l) { + return consumeToken(b, GSTRING_END); } }; final static Parser SLASHY_BEGIN_parser_ = new Parser() { @@ -7305,21 +7225,6 @@ public class GroovyBnfParser implements PsiParser, LightPsiParser { return declaration_tail(b, l + 1); } }; - final static Parser dollar_slashy_content_inner_parser_ = new Parser() { - public boolean parse(PsiBuilder b, int l) { - return dollar_slashy_content_inner(b, l + 1); - } - }; - final static Parser empty_dollar_slashy_content_parser_ = new Parser() { - public boolean parse(PsiBuilder b, int l) { - return emptyStringContent(b, l + 1, DOLLAR_SLASHY_CONTENT); - } - }; - final static Parser empty_slashy_content_parser_ = new Parser() { - public boolean parse(PsiBuilder b, int l) { - return emptyStringContent(b, l + 1, SLASHY_CONTENT); - } - }; final static Parser expression_or_application_inner_parser_ = new Parser() { public boolean parse(PsiBuilder b, int l) { return expression_or_application_inner(b, l + 1); @@ -7340,14 +7245,19 @@ public class GroovyBnfParser implements PsiParser, LightPsiParser { return extends_recovery(b, l + 1); } }; - final static Parser gstring_content_inner_parser_ = new Parser() { + final static Parser fast_dollar_slashy_content_parser_ = new Parser() { public boolean parse(PsiBuilder b, int l) { - return gstring_content_inner(b, l + 1); + return fast_dollar_slashy_content(b, l + 1); } }; - final static Parser gstring_end_parser_ = new Parser() { + final static Parser fast_slashy_content_parser_ = new Parser() { public boolean parse(PsiBuilder b, int l) { - return gstring_end(b, l + 1); + return fast_slashy_content(b, l + 1); + } + }; + final static Parser fast_string_content_parser_ = new Parser() { + public boolean parse(PsiBuilder b, int l) { + return fast_string_content(b, l + 1); } }; final static Parser implements_list_item_parser_ = new Parser() { @@ -7420,16 +7330,6 @@ public class GroovyBnfParser implements PsiParser, LightPsiParser { return semicolon_recovery(b, l + 1); } }; - final static Parser slashy_content_inner_parser_ = new Parser() { - public boolean parse(PsiBuilder b, int l) { - return slashy_content_inner(b, l + 1); - } - }; - final static Parser string_injection_parser_ = new Parser() { - public boolean parse(PsiBuilder b, int l) { - return string_injection(b, l + 1); - } - }; final static Parser throws_list_item_parser_ = new Parser() { public boolean parse(PsiBuilder b, int l) { return throws_list_item(b, l + 1); diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/parser/groovy.bnf b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/parser/groovy.bnf index 556101f6ef69..d2d695064b6a 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/parser/groovy.bnf +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/parser/groovy.bnf @@ -166,13 +166,11 @@ elementType('.*_modifier_list') = modifier_list elementType('.*_reference_expression') = reference_expression elementType('.*_class_type_element') = class_type_element - elementType('.*_content_inner') = string_content consumeTokenMethod('.*_expression') = 'consumeTokenFast' consumeTokenMethod('.*_shift.*_sign') = 'consumeTokenFast' - consumeTokenMethod('.*_content_inner') = 'consumeTokenFast' + consumeTokenMethod('fast.*') = 'consumeTokenFast' consumeTokenMethod('.*_type_definition') = 'consumeTokenFast' name(".*type_element") = 'type' - name('.*_content_inner') = '' name('.*type_definition') = '' } @@ -877,44 +875,21 @@ private simple_literal_tokens ::= NUM_INT consumeTokenMethod = 'consumeTokenFast' } -private regex_literal ::= slashy_literal | dollar_slashy_literal -{ - consumeTokenMethod = 'consumeTokenFast' -} -slashy_literal ::= SLASHY_BEGIN fast_slashy_content SLASHY_END | slashy_literal_pin -private fast_slashy_content ::= SLASHY_CONTENT { consumeTokenMethod = 'consumeTokenFast'} -private slashy_literal_pin ::= SLASHY_BEGIN (fast_slashy_content | <>) !'$' SLASHY_END -{ - pin = 3 -} -dollar_slashy_literal ::= DOLLAR_SLASHY_BEGIN fast_dollar_slashy_content? DOLLAR_SLASHY_END | dollar_slashy_literal_pin -private fast_dollar_slashy_content ::= DOLLAR_SLASHY_CONTENT { consumeTokenMethod = 'consumeTokenFast'} -private dollar_slashy_literal_pin ::= DOLLAR_SLASHY_BEGIN (fast_dollar_slashy_content | <>) !'$' DOLLAR_SLASHY_END -{ - pin = 3 -} +private regex_literal ::= slashy_literal | dollar_slashy_literal { consumeTokenMethod = 'consumeTokenFast' } +slashy_literal ::= SLASHY_BEGIN fast_slashy_content !'$' SLASHY_END { pin = 3 } +dollar_slashy_literal ::= DOLLAR_SLASHY_BEGIN fast_dollar_slashy_content? !'$' DOLLAR_SLASHY_END { pin = 3 } -gstring ::= (<>) -{ - extends = expression - consumeTokenMethod = 'consumeTokenFast' -} -private gstring_end ::= GSTRING_END -regex ::= slashy_string | dollar_slashy_string -{ - extends = expression -} -private slashy_string ::= <> -private dollar_slashy_string ::= <> -private meta compound_string ::= <> <> string_injection>> <> { pin = 1 } +gstring ::= <> { extends = expression } +regex ::= slashy_string | dollar_slashy_string { extends = expression } +private slashy_string ::= <> +private dollar_slashy_string ::= <> + +private fast_slashy_content ::= SLASHY_CONTENT +private fast_dollar_slashy_content ::= DOLLAR_SLASHY_CONTENT +private fast_string_content ::= GSTRING_CONTENT + +private meta compound_string ::= <> (<>>> | string_injection)* <> { pin = 1 } meta string_content ::= <> -gstring_content_inner ::= GSTRING_CONTENT | empty_gstring_content -slashy_content_inner ::= SLASHY_CONTENT | empty_slashy_content -dollar_slashy_content_inner ::= DOLLAR_SLASHY_CONTENT | empty_dollar_slashy_content -//TODO get rid of this weird logic -private external empty_gstring_content ::= emptyStringContent 'GSTRING_CONTENT' -private external empty_slashy_content ::= emptyStringContent 'SLASHY_CONTENT' -private external empty_dollar_slashy_content ::= emptyStringContent 'DOLLAR_SLASHY_CONTENT' string_injection ::= '$' string_injection_body { pin = 1 diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/util/GrStringUtil.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/util/GrStringUtil.java index b455271ad12d..a1a45e972a84 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/util/GrStringUtil.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/util/GrStringUtil.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.plugins.groovy.lang.psi.util; import com.intellij.lang.ASTNode; @@ -488,7 +474,6 @@ public class GrStringUtil { final GrExpression expression = factory.createExpressionFromText("\"\"\"${}" + literalText + "\"\"\""); expression.getFirstChild().delete();//quote - expression.getFirstChild().delete();//empty gstring content expression.getFirstChild().delete();//empty injection final ASTNode node = grString.getNode(); @@ -564,9 +549,6 @@ public class GrStringUtil { PsiElement child = gString.getFirstChild(); if (!(child.getNode().getElementType() == GroovyTokenTypes.mGSTRING_BEGIN)) return false; - child = child.getNextSibling(); - if (!(child instanceof GrStringContent)) return false; - child = child.getNextSibling(); if (!(child instanceof GrStringInjection)) return false; diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str7.test b/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str7.test index e792761b506a..c114ff61cf01 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str7.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str7.test @@ -3,9 +3,6 @@ Groovy script Compound Gstring PsiElement(Gstring begin)('"') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(Gstring content) - GString injection PsiElement($)('$') Reference expression diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str8.test b/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str8.test index 54a737ebaad3..b70d096e8776 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str8.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str8.test @@ -10,9 +10,6 @@ Groovy script PsiElement($)('$') Reference expression PsiElement(identifier)('str') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(Gstring content) - GString injection PsiElement($)('$') Reference expression @@ -34,9 +31,6 @@ Groovy script Reference expression PsiElement(identifier)('str') PsiElement(})('}') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(Gstring content) - GString injection PsiElement($)('$') Reference expression diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str_error1.test b/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str_error1.test index 5e53c165746a..dba85964c990 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str_error1.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str_error1.test @@ -9,8 +9,5 @@ Groovy script PsiWhiteSpace(' ') Compound Gstring PsiElement(Gstring begin)('"') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(Gstring content) - PsiErrorElement:Gstring end expected \ No newline at end of file diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str_error2.test b/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str_error2.test index 0ef0ea9ceda8..1720a0377866 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str_error2.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/gstring/str_error2.test @@ -10,9 +10,6 @@ Groovy script PsiWhiteSpace(' ') Compound Gstring PsiElement(Gstring begin)('"') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(Gstring content) - PsiErrorElement:Gstring end expected PsiElement(new line)('\n') diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/gstring/triple/quote_and_slash.test b/plugins/groovy/testdata/parsing/groovy/expressions/gstring/triple/quote_and_slash.test index 8d124ee61207..dccc28d46d4d 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/gstring/triple/quote_and_slash.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/gstring/triple/quote_and_slash.test @@ -14,14 +14,8 @@ Groovy script Reference expression PsiElement(identifier)('href') PsiElement(})('}') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(Gstring content) - GString injection PsiElement($)('$') Reference expression PsiElement(identifier)('x') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(Gstring content) - PsiElement(Gstring end)('"""') \ No newline at end of file diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/path/regexp.test b/plugins/groovy/testdata/parsing/groovy/expressions/path/regexp.test index 9966dfc57a4b..45efce6243b3 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/path/regexp.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/path/regexp.test @@ -23,9 +23,6 @@ Groovy script PsiElement(.)('.') Compound regular expression PsiElement(regex begin)('/') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(regex content) - GString injection PsiElement($)('$') Closable block @@ -35,9 +32,6 @@ Groovy script Reference expression PsiElement(identifier)('a') PsiElement(})('}') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(regex content) - PsiElement(regex end)('/') PsiElement(.)('.') Compound regular expression @@ -48,7 +42,4 @@ Groovy script PsiElement($)('$') Reference expression PsiElement(identifier)('g') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement($/ regex content) - PsiElement($/ regex end)('/$') \ No newline at end of file diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/regex/dollarSlashy4.test b/plugins/groovy/testdata/parsing/groovy/expressions/regex/dollarSlashy4.test index fee809747743..9e72776d3162 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/regex/dollarSlashy4.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/regex/dollarSlashy4.test @@ -18,8 +18,5 @@ Groovy script PsiElement($)('$') PsiErrorElement:Identifier or code block expected - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement($/ regex content) - PsiErrorElement:$/ regex end expected \ No newline at end of file diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/regex/dollarSlashyEof.test b/plugins/groovy/testdata/parsing/groovy/expressions/regex/dollarSlashyEof.test index aff6990fcbce..f03706fcd2d9 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/regex/dollarSlashyEof.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/regex/dollarSlashyEof.test @@ -13,8 +13,5 @@ Groovy script Literal GroovyASTPsiElementImpl(DOLLAR_SLASHY_LITERAL) PsiElement($/ regex begin)('$/') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement($/ regex content) - PsiErrorElement:$/ regex end expected \ No newline at end of file diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex10.test b/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex10.test index d3db3a92582a..a4a8bcafc7c4 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex10.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex10.test @@ -37,9 +37,6 @@ Groovy script Reference expression PsiElement(identifier)('b') PsiElement(})('}') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(Gstring content) - PsiElement(Gstring end)('"') PsiElement(})('}') GrStringContentImpl(STRING_CONTENT) diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex16.test b/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex16.test index 046da857cc5f..3cb7f07ab403 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex16.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex16.test @@ -3,15 +3,9 @@ Groovy script Compound regular expression PsiElement(regex begin)('/') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(regex content) - GString injection PsiElement($)('$') PsiErrorElement:Identifier or code block expected - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(regex content) - PsiErrorElement:regex end expected \ No newline at end of file diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex20.test b/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex20.test index 01d872ff5086..c2e2a9c0bff1 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex20.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex20.test @@ -20,8 +20,5 @@ Groovy script Literal PsiElement(Integer)('2') PsiElement(})('}') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(regex content) - PsiElement(regex end)('/') PsiElement())(')') \ No newline at end of file diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex22.test b/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex22.test index 2bf74fd09794..f13ddd70ad61 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex22.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex22.test @@ -3,9 +3,6 @@ Groovy script Compound regular expression PsiElement(regex begin)('/') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(regex content) - GString injection PsiElement($)('$') Closable block @@ -15,9 +12,6 @@ Groovy script Literal PsiElement(Integer)('1') PsiElement(})('}') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(regex content) - GString injection PsiElement($)('$') Closable block @@ -27,7 +21,4 @@ Groovy script Literal PsiElement(Integer)('2') PsiElement(})('}') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(regex content) - PsiElement(regex end)('/') \ No newline at end of file diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex23.test b/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex23.test index 66ac5e2ca871..00e27cd6ae22 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex23.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex23.test @@ -3,9 +3,6 @@ $/${1}${2}/$ Groovy script Compound regular expression PsiElement($/ regex begin)('$/') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement($/ regex content) - GString injection PsiElement($)('$') Closable block @@ -15,9 +12,6 @@ Groovy script Literal PsiElement(Integer)('1') PsiElement(})('}') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement($/ regex content) - GString injection PsiElement($)('$') Closable block @@ -27,7 +21,4 @@ Groovy script Literal PsiElement(Integer)('2') PsiElement(})('}') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement($/ regex content) - PsiElement($/ regex end)('/$') \ No newline at end of file diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex8.test b/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex8.test index 3573f1afa9c9..453210c6cc45 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex8.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex8.test @@ -39,9 +39,6 @@ Groovy script Reference expression PsiElement(identifier)('b') PsiElement(})('}') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(Gstring content) - PsiElement(Gstring end)('"') PsiElement(})('}') GrStringContentImpl(STRING_CONTENT) diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex9.test b/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex9.test index d3a707adef59..5d0042a6e830 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex9.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/regex/regex9.test @@ -40,9 +40,6 @@ Groovy script Reference expression PsiElement(identifier)('b') PsiElement(})('}') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(Gstring content) - PsiElement(Gstring end)('"') PsiElement(})('}') GrStringContentImpl(STRING_CONTENT) diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/special/map5.test b/plugins/groovy/testdata/parsing/groovy/expressions/special/map5.test index 3b23912b08c9..226772fb02f8 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/special/map5.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/special/map5.test @@ -7,9 +7,6 @@ Groovy script Argument label Compound Gstring PsiElement(Gstring begin)('"') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(Gstring content) - GString injection PsiElement($)('$') Reference expression @@ -24,9 +21,6 @@ Groovy script PsiWhiteSpace(' ') Compound Gstring PsiElement(Gstring begin)('"') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(Gstring content) - GString injection PsiElement($)('$') Reference expression diff --git a/plugins/groovy/testdata/parsing/groovy/statements/blocks/clos3.test b/plugins/groovy/testdata/parsing/groovy/statements/blocks/clos3.test index 403f9836c215..6a97c1103954 100644 --- a/plugins/groovy/testdata/parsing/groovy/statements/blocks/clos3.test +++ b/plugins/groovy/testdata/parsing/groovy/statements/blocks/clos3.test @@ -39,9 +39,6 @@ Groovy script Literal PsiElement(Integer)('3') PsiElement(})('}') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(Gstring content) - PsiErrorElement:Gstring end expected PsiElement(new line)('\n ') @@ -51,8 +48,5 @@ Groovy script Command arguments Compound Gstring PsiElement(Gstring begin)('"""') - GrStringContentImpl(STRING_CONTENT) - ASTWrapperPsiElement(Gstring content) - PsiErrorElement:Gstring end expected \ No newline at end of file