Releases: TeamworkGuy2/JParseCode
Releases · TeamworkGuy2/JParseCode
JParseCode 0.23.2
Added
classSignature.commentsparsing and AST output added
JParseCode 0.23.1
Changed
- Expanded C# and Java field parsing tests
JParseCode 0.23.0
Added
- Lots of additional unit tests
TypeExtractor.isSimpleLiteral()used to determine whether aFieldDef.initializershould be serialized as a literal value"initializer"or an"initializerExpression"
Changed
FieldExtractornow parses field default value assignments and returnsFieldDefinstead ofFieldSig(FieldDefcontainsinitializerfield)FieldExtractorconstructor requires a new 3rd parameter, anOperatorUtil<>ClassAstremoveT_ENUMtype parameter, enum members in a parsed enum will be represented byT_FIELDFieldDef.initializerToJson()signature changed significantly to support new multiple token initializer expressionsAccessModifierParserandAccessModifierEnumremovedparseFromSrc(), cleaned up code, added documentationAccessModifierParsertryParseFromSrc(String)anddefaultAccessModifier(String, ...)modified to takesList<String>for correctness and to simplify call sitesAstExtractor.createFieldParser()and implementations (CsBlockandJavaBlock) now returnAstParser<List<FieldDef>>instead of...FieldSigBlockUtilparseKeyword()andtryParseKeyword()replaced withtryToBlock()CsBlockParser._extractBlocksFromTree()renamedextractBlocksFromTree()(which was already public)AstParseraddedblockComplete()with empty default implementation, will be called byBlockExtractor
Removed
- Merged
FieldSigandFieldSigResolvedintoFieldDefandFieldDefResolved
Fixed
- C# annotation parsing fixed to handle multiple annotations in the same block, i.e. '[Annotation(One), Annotation(Two), ...]'
- An issue with nested classes/interfaces getting assigned the incorrect access modifiers
- An issue with complex generic type parsing
JParseCode 0.22.0
Removed
ProjectClassSetresolveSimpleName()in favor of moving the two lines of code to the single calling location
Fixed
- C# full type name resolution fixed to resolve against the parent namespaces the class resides in (affects types in class signatures, method signatures, and fields)
- Java class signature parsing fixed to support both
extendsand implements in the same signatureimplements(can't believe I overlooked this and didn't have a unit test)
JParseCode 0.21.0
Parsing performance optimizations (~15-20%)
Changed
- Update dependencies
[email protected]and[email protected] ParserActionLoggerandParseTimesoptimizations and changes to work withjtext-tokenizernewTokenizationLoggerJavaFileTokenizer,CsFileTokenizer,CommentTokenizer,IdentifierTokenizer, andNumberTokenizerreusable/reusableCharParsersflag implementation to control whichCharParserMatchableFactoryimplementation is usedCodeTokenizer.tokenizeDocument()fragmentConstructorparameter optimization to skip creating fragment source string twice, major performance improvement ~5-10%- New aggregate performance logging output for text tokenization related counters
JParseCode 0.20.0
Method generic type parameters parsing support (i.e. 'public T Create()' in C#).
Added
- Method generic type parameters added -
MethodSigand sub-classes have a newtypeParametersfield. Note: if these 'types' contain lower/upper type bounds these are included in thetypeNameproperty in Java and are not yet included in C# parsing- Added basic unit tests for this new method generic type parameters parsing support
AstFragType.isBlock(CodeToken, char)overload for attempted performance optimization
Changed
- Renamed
DataTypeExtractor->TypeExtractor - Added
EnhancedListIteratoras a replacement forTokenListIterableto try and simplify fragment iteration since it is a fairly hot section of code in most parsing scenarios ParseTimes.TrackerActionenums renamed:LOAD->READPARSE->EXTRACT_AST
- Update dependency [email protected] and code to match
- Adjustments to
new CharParserMatchableFactory()andCharConditions.Identifier.newInstance()calls inIdentifierTokenizerandNumberTokenizer
- Adjustments to
- JSON output now excludes empty
annotationsarrays on fields, methods, and parameters - Additional performance log counters added to several methods and printed when performance info is enabled via
-debugCLI flag
Removed
AstFragType.isType()static method and overloads since they were unused- Unused
CommentTokenizer.createCommentTokenizerForJava()
Fixed
- An exception being thrown when resolving class names if a file imported a namespace and also imported a child namespace of the first namespace
JParseCode 0.19.2
Parameter varargs parsing support (i.e. 'int...' in Java).
Changed
- Update dependency
[email protected]and[email protected]- Classes combined, class names simplified, and unused classes and methods removed from libraries
- Code identifier parser now provided by
jtext-tokenizer - Several bug fixes around compound optional parser conditions
- Added
char[] src, int srcOff, int srcLenparameters toCodeTokenizer.tokenizeDocument() - Renamed
IdentifierTokenizernewIdentifierTokenizer()tocreateIdentifierTokenizer() - Improved unit tests
Removed
IdentifierTokenizer.createIdentifierTokenizer()
JParseCode 0.19.1
Changed
- Finish
CommentAndWhitespaceExtractorand tests for it TextTokeninterface now includeshashCode()andequals(Object)TextFragmentRefTokennow implementshashCode()andequals(Object)
- Minor code cleanup, use
StringSplit.split()withcharinstead ofStringwhere possible
JParseCode 0.19.0
0.19.0 - 2019-07-04
Changed
IdentifierTokenizer.createIdentifierWithGenericTypeTokenizer()now takes one parameterint maxGenericTypeDepth- Changed
CsFileTokenizer.createFileParser()->createCsTokenizers()andJavaFileTokenizer.createFileParser()->createJavaTokenizers() - Added some private constructors that throw AssertionError to static classes
Removed
- Changed
GenericTypeTokenizer._createGenericTypeTokenizer()from public to private - Removed
IdentifierTokenizerfieldstatic int genericTypeDepthin favor of callers explicitly passing the argument tocreateIdentifierWithGenericTypeTokenizer()which now takes one parameterint maxGenericTypeDepth - Removed
CodeTokenizerBuilderin favor ofCodeTokenizerstatic methods- Manually build a tokenizer list of type
PairList<CharParserFactory, TextTransformer<CodeTokenType>> - Call
CodeTokenizer.createTokenizer()with the language you used to pass to theCodeTokenizerBuilderconstructor and the list of tokenizers you manually created
- Manually build a tokenizer list of type
Fixed
AnnotationExtractorto handle all C# keyword-followed-by-a-block annotation arguments likedefault(T),nameof(T), andtypeof(T)
JParseCode 0.18.1
Fixed
AnnotationExtractorto handle C#typeof(T)annotation arguments