Releases: TeamworkGuy2/JParseCode
Releases · TeamworkGuy2/JParseCode
JParseCode 0.23.2
Added
classSignature.comments
parsing 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.initializer
should be serialized as a literal value"initializer"
or an"initializerExpression"
Changed
FieldExtractor
now parses field default value assignments and returnsFieldDef
instead ofFieldSig
(FieldDef
containsinitializer
field)FieldExtractor
constructor requires a new 3rd parameter, anOperatorUtil<>
ClassAst
removeT_ENUM
type parameter, enum members in a parsed enum will be represented byT_FIELD
FieldDef.initializerToJson()
signature changed significantly to support new multiple token initializer expressionsAccessModifierParser
andAccessModifierEnum
removedparseFromSrc()
, cleaned up code, added documentationAccessModifierParser
tryParseFromSrc(String)
anddefaultAccessModifier(String, ...)
modified to takesList<String>
for correctness and to simplify call sitesAstExtractor.createFieldParser()
and implementations (CsBlock
andJavaBlock
) now returnAstParser<List<FieldDef>>
instead of...FieldSig
BlockUtil
parseKeyword()
andtryParseKeyword()
replaced withtryToBlock()
CsBlockParser._extractBlocksFromTree()
renamedextractBlocksFromTree()
(which was already public)AstParser
addedblockComplete()
with empty default implementation, will be called byBlockExtractor
Removed
- Merged
FieldSig
andFieldSigResolved
intoFieldDef
andFieldDefResolved
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
ProjectClassSet
resolveSimpleName()
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
extends
and 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]
ParserActionLogger
andParseTimes
optimizations and changes to work withjtext-tokenizer
newTokenizationLogger
JavaFileTokenizer
,CsFileTokenizer
,CommentTokenizer
,IdentifierTokenizer
, andNumberTokenizer
reusable/reusableCharParsers
flag implementation to control whichCharParserMatchableFactory
implementation is usedCodeTokenizer.tokenizeDocument()
fragmentConstructor
parameter 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 -
MethodSig
and sub-classes have a newtypeParameters
field. Note: if these 'types' contain lower/upper type bounds these are included in thetypeName
property 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
EnhancedListIterator
as a replacement forTokenListIterable
to try and simplify fragment iteration since it is a fairly hot section of code in most parsing scenarios ParseTimes.TrackerAction
enums renamed:LOAD
->READ
PARSE
->EXTRACT_AST
- Update dependency [email protected] and code to match
- Adjustments to
new CharParserMatchableFactory()
andCharConditions.Identifier.newInstance()
calls inIdentifierTokenizer
andNumberTokenizer
- Adjustments to
- JSON output now excludes empty
annotations
arrays on fields, methods, and parameters - Additional performance log counters added to several methods and printed when performance info is enabled via
-debug
CLI 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 srcLen
parameters toCodeTokenizer.tokenizeDocument()
- Renamed
IdentifierTokenizer
newIdentifierTokenizer()
tocreateIdentifierTokenizer()
- Improved unit tests
Removed
IdentifierTokenizer.createIdentifierTokenizer()
JParseCode 0.19.1
Changed
- Finish
CommentAndWhitespaceExtractor
and tests for it TextToken
interface now includeshashCode()
andequals(Object)
TextFragmentRefToken
now implementshashCode()
andequals(Object)
- Minor code cleanup, use
StringSplit.split()
withchar
instead ofString
where 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
IdentifierTokenizer
fieldstatic int genericTypeDepth
in favor of callers explicitly passing the argument tocreateIdentifierWithGenericTypeTokenizer()
which now takes one parameterint maxGenericTypeDepth
- Removed
CodeTokenizerBuilder
in favor ofCodeTokenizer
static methods- Manually build a tokenizer list of type
PairList<CharParserFactory, TextTransformer<CodeTokenType>>
- Call
CodeTokenizer.createTokenizer()
with the language you used to pass to theCodeTokenizerBuilder
constructor and the list of tokenizers you manually created
- Manually build a tokenizer list of type
Fixed
AnnotationExtractor
to handle all C# keyword-followed-by-a-block annotation arguments likedefault(T)
,nameof(T)
, andtypeof(T)
JParseCode 0.18.1
Fixed
AnnotationExtractor
to handle C#typeof(T)
annotation arguments