mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Root node creation fixed
This commit is contained in:
@@ -790,7 +790,9 @@ public class PsiBuilderImpl extends UserDataHolderBase implements PsiBuilder {
|
||||
}
|
||||
|
||||
private ASTNode createRootAST(final StartMarker rootMarker) {
|
||||
final ASTNode rootNode = createComposite(rootMarker);
|
||||
final IElementType type = rootMarker.getTokenType();
|
||||
final ASTNode rootNode = type instanceof IFileElementType ?
|
||||
ASTFactory.lazy((ILazyParseableElementType)type, null) : createComposite(rootMarker);
|
||||
if (myCharTable == null) {
|
||||
myCharTable = rootNode instanceof FileElement ? ((FileElement)rootNode).getCharTable() : new CharTableImpl();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user