Skip to content

Commit 4a12eef

Browse files
committed
revert to special visitor name handling
1 parent 1110b2c commit 4a12eef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

support/org/intellij/grammar/generator/ParserGenerator.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,9 @@ public ParserGenerator(BnfFile tree, String sourcePath, String outputPath) {
121121
myPsiTreeUtilClass = getRootAttribute(myFile, KnownAttribute.PSI_TREE_UTIL_CLASS);
122122

123123
String tmpVisitorClass = getRootAttribute(myFile, KnownAttribute.PSI_VISITOR_NAME);
124-
visitorClassName = !G.generateVisitor || StringUtil.isEmpty(tmpVisitorClass) ?
125-
null : myPsiClassFormat.enforce(tmpVisitorClass);
124+
visitorClassName = !G.generateVisitor || StringUtil.isEmpty(tmpVisitorClass) ? null :
125+
!tmpVisitorClass.equals(myPsiClassFormat.strip(tmpVisitorClass)) ? tmpVisitorClass :
126+
myPsiClassFormat.enforce("") + tmpVisitorClass;
126127
mySimpleTokens = ContainerUtil.newLinkedHashMap(RuleGraphHelper.getTokenMap(myFile));
127128
myUnknownRootAttributes = collectUnknownAttributes(myFile);
128129
myGraphHelper = RuleGraphHelper.getCached(myFile);

0 commit comments

Comments
 (0)