Skip to content

Commit b36432e

Browse files
committed
0.15.7 - Update CodeTokenizerBuilder to use SimpleTreeImpl.removeChildRef() instead of removeChild() for performance, update dependencies [email protected], [email protected], [email protected].
1 parent d14366d commit b36432e

File tree

8 files changed

+18
-7
lines changed

8 files changed

+18
-7
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,17 @@ This project does its best to adhere to [Semantic Versioning](http://semver.org/
44

55

66
--------
7-
### [0.15.6](N/A) - 2018-09-22
7+
### [0.15.7](N/A) - 2018-09-23
8+
#### Changed
9+
* Updated `CodeTokenizerBuilder.removeChildren()` to use `SimpleTreeImpl.removeChildRef()` instead of `removeChild()` for improved performance
10+
* Updated dependencies:
11+
12+
13+
14+
15+
16+
--------
17+
### [0.15.6](https://github.com/TeamworkGuy2/JParseCode/commit/1dfac7f27c9a2ae962a0f070083c48ef69405bd1) - 2018-09-22
818
#### Added
919
* Parameter default value parsing support added to `MethodParametersParser`
1020
* Added `DataTypeExtractor.isDefaultValueLiteral()` to check for field/parameter default values

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
JParseCode
22
==============
3-
version: 0.15.6
3+
version: 0.15.7
44

55
In progress C#/Java/TypeScript parser tools built atop [JTextParser](https://github.com/TeamworkGuy2/JTextParser), [Jackson](https://github.com/FasterXML/jackson-core/) (core, databind, annotations) and half a dozen other utility libraries.
66

bin/jparse_code-with-tests.jar

447 Bytes
Binary file not shown.

bin/jparse_code.jar

337 Bytes
Binary file not shown.

package-lib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version" : "0.15.6",
2+
"version" : "0.15.7",
33
"name" : "jparse-code",
44
"description" : "An in-progress suite of parsing/transpilation tools for C#, Java, and TypeScript code. Generates simple JSON ASTs.",
55
"homepage" : "https://github.com/TeamworkGuy2/JParseCode",

src/twg2/parser/codeParser/java/JavaBlockParser.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import twg2.ast.interm.field.FieldSig;
1515
import twg2.ast.interm.method.MethodSigSimple;
1616
import twg2.ast.interm.type.TypeSig;
17+
import twg2.collections.interfaces.ListReadOnly;
1718
import twg2.parser.codeParser.AstExtractor;
1819
import twg2.parser.codeParser.extractors.AccessModifierExtractor;
1920
import twg2.parser.codeParser.extractors.BlockExtractor;
@@ -179,7 +180,7 @@ public static void _extractBlocksFromTree(List<String> nameScope, SimpleTree<Cod
179180

180181
private static String parsePackageDeclaration(SimpleTree<CodeToken> astTree) {
181182
val lang = CodeLanguageOptions.JAVA;
182-
List<SimpleTree<CodeToken>> childs = null;
183+
ListReadOnly<SimpleTree<CodeToken>> childs = null;
183184
if(astTree.hasChildren() && (childs = astTree.getChildren()).size() > 1) {
184185
if(lang.getAstUtil().isKeyword(childs.get(0).getData(), JavaKeyword.PACKAGE) &&
185186
AstFragType.isIdentifier(childs.get(1).getData())) {

src/twg2/parser/main/MainParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static void main(String[] args) throws IOException, FileFormatException {
2525
FileReadUtil fileReader = FileReadUtil.threadLocalInst();
2626

2727
// TODO for VisualVM pause
28-
//Scanner in = new Scanner(System.in);
28+
//java.util.Scanner in = new java.util.Scanner(System.in);
2929
//System.out.print("press enter to continue: ");
3030
//in.nextLine();
3131

src/twg2/parser/tokenizers/CodeTokenizerBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ public static <D extends TextToken<S, T>, S, T> List<SimpleTreeImpl<D>> getChild
215215
*/
216216
public static <D extends TextToken<S, T>, S, T> void removeChildren(SimpleTreeImpl<D> tree, List<SimpleTreeImpl<D>> children) {
217217
for(int i = 0, size = children.size(); i < size; i++) {
218-
SimpleTree<D> child = children.get(i);
219-
boolean res = tree.removeChild(child);
218+
SimpleTreeImpl<D> child = children.get(i);
219+
boolean res = tree.removeChildRef(child);
220220
if(res == false) {
221221
throw new IllegalStateException("could not remove child '" + child + "' from tree '" + tree + "'");
222222
}

0 commit comments

Comments
 (0)