Skip to content

Commit 283d487

Browse files
committed
0.14.5 - Update dependencies jfunc and jtext-parser (Predicates.Char -> CharPredicate, and new CharParserPredicate interface)
1 parent 8ac1384 commit 283d487

File tree

6 files changed

+15
-11
lines changed

6 files changed

+15
-11
lines changed

CHANGELOG.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22
All notable changes to this project will be documented in this file.
33
This project does its best to adhere to [Semantic Versioning](http://semver.org/).
44

5+
--------
6+
### [0.14.5](N/A) - 2017-08-20
7+
#### Changed
8+
* Update dependencies:
9+
* jfunc@0.3.0 (Predicates.Char -> CharPredicate)
10+
* jtext-parser@0.12.0 (CharParserPredicate interface instead of BiPredicates.CharObject<TextParser>)
11+
512

613
--------
7-
### [0.14.4](N/A) - 2017-06-25
14+
### [0.14.4](https://github.com/TeamworkGuy2/JParseCode/commit/8ac1384c8de1a310d5097b843e657bacc029f11a) - 2017-06-25
815
#### Added
916
* Two more JUnit tests, CsModelParseTest and JavaModelParseTest
1017
* Added unit test helpers: test.twg2.parser.test.utils FieldAssert, MethodAssert, and TypeAssert

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
JParseCode
22
==============
3-
version: 0.14.4
3+
version: 0.14.5
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

77
### Goals:
8-
* A competent source code parser that can turn C#, Java, or JavaScript/TypeScript code into a simple AST like structure ('competent' meaning this project aims to support common use cases, not every syntatic feature of the supported languages).
8+
* A source code parser that can turn C#, Java, or JavaScript/TypeScript code into a simple AST like structure ('competent' meaning this project aims to support common use cases, not every syntatic feature of the supported languages).
99
* A code first parser aimed at manipulating the resulting AST and writing it back as source code or JSON. With the goal of allowing simple language constructs like interfaces and data models to be transpiled to different languages.
1010

1111
### Not Goals:

bin/jparse_code-with-tests.jar

373 Bytes
Binary file not shown.

bin/jparse_code.jar

-181 Bytes
Binary file not shown.

package-lib.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version" : "0.14.4",
2+
"version" : "0.14.5",
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/tokenizers/NumberTokenizer.java

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
package twg2.parser.tokenizers;
22

3-
import lombok.val;
4-
import twg2.functions.BiPredicates;
53
import twg2.parser.condition.text.CharParser;
4+
import twg2.parser.condition.text.CharParserPredicate;
65
import twg2.parser.primitive.NumericParser;
7-
import twg2.parser.textParser.TextParser;
86
import twg2.ranges.CharSearchSet;
97
import twg2.text.tokenizer.CharParserMatchableFactory;
108
import twg2.tuple.Tuples;
@@ -24,9 +22,9 @@ public static CharParserMatchableFactory<CharParser> createNumericLiteralTokeniz
2422
notPreceedingSet.addRange('a', 'z');
2523

2624
// do not parse number sign -/+
27-
val numParser = new NumericParser("numeric literal", false);
25+
NumericParser numParser = new NumericParser("numeric literal", false);
2826

29-
BiPredicates.CharObject<TextParser> charCheck = (ch, buf) -> {
27+
CharParserPredicate charCheck = (ch, buf) -> {
3028
boolean isFirst = numParser.getFirstCharMatcher().test(ch, buf);
3129
boolean hasPrev = buf.hasPrevChar();
3230
if(!hasPrev) { return isFirst; }
@@ -36,8 +34,7 @@ public static CharParserMatchableFactory<CharParser> createNumericLiteralTokeniz
3634
return isFirst && !notPreceedingSet.contains(prevCh);
3735
};
3836

39-
val numericLiteralParser = new CharParserMatchableFactory<CharParser>("numeric literal", false, Tuples.of(charCheck, numParser));
40-
return numericLiteralParser;
37+
return new CharParserMatchableFactory<CharParser>("numeric literal", false, Tuples.of(charCheck, numParser));
4138
}
4239

4340
}

0 commit comments

Comments
 (0)