Skip to content

Releases

Crossandra 2.3.0

Choose a tag to compare

@trag1c trag1c released this 14 Apr 22:19
4be73d5

Added

  • Crossandra.tokenize and Crossandra.tokenize_lines now accept an optional with_positions argument. When set to True, the resulting tokens will be of the (int, T) pair form, with the first element being the starting position of the token relative to the start of the string (or the start of the line when using tokenize_lines), and T being the actual token.

Removed

  • Python 3.8 and 3.9 support

Crossandra 2.2.1

Choose a tag to compare

@trag1c trag1c released this 29 May 13:54
779a2c5

Fixed

  • Fixed mypyc wheels failing to generate a tree for a non-empty enum (#36)

Crossandra 2.2.0

Choose a tag to compare

@trag1c trag1c released this 29 May 12:06
a2642be

Added

  • RuleGroup.apply
  • common.ANY_INT
  • common.ANY_FLOAT
  • common.ANY_NUMBER

Crossandra 2.1.0

Choose a tag to compare

@trag1c trag1c released this 01 May 17:26
811478d

This release should also include mypyc wheels for Python 3.12 on PyPI.

Added

  • Rule objects now accept re.Pattern for pattern
  • Improved typing for Rule.__eq__, Rule.__or__, and RuleGroup.__or__
  • Rule objects can now be unioned with RuleGroups

Fixed

  • The common.NUMBER and common.SIGNED_NUMBER rule groups now correctly prioritize floats over integers

Crossandra 2.0.0

Choose a tag to compare

@trag1c trag1c released this 29 Apr 17:51
78bfe1f

Added

  • Aliases for enums
  • API tests
  • Common pattern tests (big thanks to @qexat)
  • Docstrings
  • Python 3.8 support
  • Typehints and docstrings are now supported when using mypyc wheels (big thanks to @Lunarmagpie)

Changed

  • Allowed underscores in numeric literal patterns
  • CrossandraTokenizationError and CrossandraValueError are now raised instead of CrossandraError (it can be used to catch both exceptions)
  • Improved documentation
  • Rule objects are now comparable, hashable and immutable
  • Slightly improved performance when tokenizing with empty enums (up to 10% faster)
  • The IGNORED/NOT_APPLIED constants (and their types) can now be imported directly
  • The pre-tokenization CRLF to LF conversion can now be disabled through the Crossandra(convert_crlf=...) parameter
  • Updated Rule signature:
    • Rule(converter=True) -> Rule(converter=None)
    • Rule(converter=False) -> Rule(ignore=True)
    • flags is now a keyword-only argument

Fixed

  • Fixed bad traversal bug (big thanks to @circuitsacul)
  • Fixed common patterns:
    • CHAR
    • DECIMAL
    • FLOAT (and its derivatives)

Crossandra 1.3.0

Choose a tag to compare

@trag1c trag1c released this 07 Mar 19:49
ae069d7

Added

  • py.typed
  • more very explicit typehints

Crossandra 1.2.4

Choose a tag to compare

@trag1c trag1c released this 10 Dec 05:23

Changed

  • Speed improvements (up to 5x faster for pure Python wheels & up to 30% faster for mypyc-compiled wheels)

Big thanks to @circuitsacul for implementing the faster algorithm! ❤️

Crossandra 1.2.3

Choose a tag to compare

@trag1c trag1c released this 22 Nov 02:04

Fixed

  • Crossandra now builds correctly for Python 3.10+ (big thanks to @Lunarmagpie for fixing that)

Crossandra 1.2.2

Choose a tag to compare

@trag1c trag1c released this 18 Nov 04:28

Fixed

  • Fixed Ignored objects being included in the output

Crossandra 1.2.1

Choose a tag to compare

@trag1c trag1c released this 18 Nov 02:49
ea23334

Fixed

  • Made Rule a regular class to comply with mypyc