Cleanup (formatting)

This commit is contained in:
Roman Shevchenko
2015-04-23 16:03:31 +02:00
parent 9d98bbcc04
commit 8a616ff610
2 changed files with 8 additions and 5 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -57,12 +57,13 @@ public class FCTSBackedLighterAST extends LighterAST {
return new LighterASTNodeList(numKids, elements);
}
@Override
public void disposeChildren(@NotNull List<LighterASTNode> children) {
if (children instanceof LighterASTNodeList) {
LighterASTNodeList nodes = (LighterASTNodeList)children;
myTreeStructure.disposeChildren(nodes.myElements, nodes.mySize);
} else {
}
else {
LighterASTNode[] astNodes = new LighterASTNode[children.size()];
myTreeStructure.disposeChildren(children.toArray(astNodes), astNodes.length);
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -114,7 +114,9 @@ public class LightTreeUtil {
}
public static void toBuffer(@NotNull LighterAST tree, @NotNull LighterASTNode node, @NotNull StringBuilder buffer, @Nullable TokenSet skipTypes) {
if (skipTypes != null && skipTypes.contains(node.getTokenType())) return;
if (skipTypes != null && skipTypes.contains(node.getTokenType())) {
return;
}
if (node instanceof LighterASTTokenNode) {
buffer.append(((LighterASTTokenNode)node).getText());