Skip to content

Releases: TeamworkGuy2/JParseCode

JParseCode 0.23.2

21 Aug 18:19
Compare
Choose a tag to compare

Added

  • classSignature.comments parsing and AST output added

JParseCode 0.23.1

14 Aug 23:48
Compare
Choose a tag to compare

Changed

  • Expanded C# and Java field parsing tests

JParseCode 0.23.0

28 Jun 23:18
Compare
Choose a tag to compare

Added

  • Lots of additional unit tests
  • TypeExtractor.isSimpleLiteral() used to determine whether a FieldDef.initializer should be serialized as a literal value "initializer" or an "initializerExpression"

Changed

  • FieldExtractor now parses field default value assignments and returns FieldDef instead of FieldSig (FieldDef contains initializer field)
  • FieldExtractor constructor requires a new 3rd parameter, an OperatorUtil<>
  • ClassAst remove T_ENUM type parameter, enum members in a parsed enum will be represented by T_FIELD
  • FieldDef.initializerToJson() signature changed significantly to support new multiple token initializer expressions
  • AccessModifierParser and AccessModifierEnum removed parseFromSrc(), cleaned up code, added documentation
  • AccessModifierParser tryParseFromSrc(String) and defaultAccessModifier(String, ...) modified to takes List<String> for correctness and to simplify call sites
  • AstExtractor.createFieldParser() and implementations (CsBlock and JavaBlock) now return AstParser<List<FieldDef>> instead of ...FieldSig
  • BlockUtil parseKeyword() and tryParseKeyword() replaced with tryToBlock()
  • CsBlockParser._extractBlocksFromTree() renamed extractBlocksFromTree() (which was already public)
  • AstParser added blockComplete() with empty default implementation, will be called by BlockExtractor

Removed

  • Merged FieldSig and FieldSigResolved into FieldDef and FieldDefResolved

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

19 Apr 02:47
Compare
Choose a tag to compare

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 signature implements (can't believe I overlooked this and didn't have a unit test)

JParseCode 0.21.0

26 Nov 17:27
Compare
Choose a tag to compare

Parsing performance optimizations (~15-20%)

Changed

  • Update dependencies [email protected] and [email protected]
  • ParserActionLogger and ParseTimes optimizations and changes to work with jtext-tokenizer new TokenizationLogger
  • JavaFileTokenizer, CsFileTokenizer, CommentTokenizer, IdentifierTokenizer, and NumberTokenizer reusable/reusableCharParsers flag implementation to control which CharParserMatchableFactory implementation is used
  • CodeTokenizer.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

22 Nov 05:08
Compare
Choose a tag to compare

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 new typeParameters field. Note: if these 'types' contain lower/upper type bounds these are included in the typeName 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 for TokenListIterable 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() and CharConditions.Identifier.newInstance() calls in IdentifierTokenizer and NumberTokenizer
  • 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

23 May 19:49
Compare
Choose a tag to compare

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 to CodeTokenizer.tokenizeDocument()
  • Renamed IdentifierTokenizer newIdentifierTokenizer() to createIdentifierTokenizer()
  • Improved unit tests

Removed

  • IdentifierTokenizer.createIdentifierTokenizer()

JParseCode 0.19.1

20 Apr 03:31
Compare
Choose a tag to compare

Changed

  • Finish CommentAndWhitespaceExtractor and tests for it
  • TextToken interface now includes hashCode() and equals(Object)
    • TextFragmentRefToken now implements hashCode() and equals(Object)
  • Minor code cleanup, use StringSplit.split() with char instead of String where possible

JParseCode 0.19.0

04 Jul 20:38
Compare
Choose a tag to compare

0.19.0 - 2019-07-04

Changed

  • IdentifierTokenizer.createIdentifierWithGenericTypeTokenizer() now takes one parameter int maxGenericTypeDepth
  • Changed CsFileTokenizer.createFileParser() -> createCsTokenizers() and JavaFileTokenizer.createFileParser() -> createJavaTokenizers()
  • Added some private constructors that throw AssertionError to static classes

Removed

  • Changed GenericTypeTokenizer._createGenericTypeTokenizer() from public to private
  • Removed IdentifierTokenizer field static int genericTypeDepth in favor of callers explicitly passing the argument to createIdentifierWithGenericTypeTokenizer() which now takes one parameter int maxGenericTypeDepth
  • Removed CodeTokenizerBuilder in favor of CodeTokenizer static methods
    • Manually build a tokenizer list of type PairList<CharParserFactory, TextTransformer<CodeTokenType>>
    • Call CodeTokenizer.createTokenizer() with the language you used to pass to the CodeTokenizerBuilder constructor and the list of tokenizers you manually created

Fixed

  • AnnotationExtractor to handle all C# keyword-followed-by-a-block annotation arguments like default(T), nameof(T), and typeof(T)

JParseCode 0.18.1

03 Jul 01:45
Compare
Choose a tag to compare

Fixed

  • AnnotationExtractor to handle C# typeof(T) annotation arguments