Repository navigation
Releases
Releases · trag1c/crossandra
Crossandra 2.3.0
Added
Crossandra.tokenizeandCrossandra.tokenize_linesnow accept an optionalwith_positionsargument. When set toTrue, 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 usingtokenize_lines), andTbeing the actual token.
Removed
- Python 3.8 and 3.9 support
Crossandra 2.2.1
Fixed
- Fixed mypyc wheels failing to generate a tree for a non-empty enum (#36)
Crossandra 2.2.0
Added
RuleGroup.applycommon.ANY_INTcommon.ANY_FLOATcommon.ANY_NUMBER
Crossandra 2.1.0
This release should also include mypyc wheels for Python 3.12 on PyPI.
Added
Ruleobjects now acceptre.Patternforpattern- Improved typing for
Rule.__eq__,Rule.__or__, andRuleGroup.__or__ Ruleobjects can now be unioned withRuleGroups
Fixed
- The
common.NUMBERandcommon.SIGNED_NUMBERrule groups now correctly prioritize floats over integers
Crossandra 2.0.0
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
CrossandraTokenizationErrorandCrossandraValueErrorare now raised instead ofCrossandraError(it can be used to catch both exceptions)- Improved documentation
Ruleobjects are now comparable, hashable and immutable- Slightly improved performance when tokenizing with empty enums (up to 10% faster)
- The
IGNORED/NOT_APPLIEDconstants (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
Rulesignature:Rule(converter=True)->Rule(converter=None)Rule(converter=False)->Rule(ignore=True)flagsis now a keyword-only argument
Fixed
- Fixed bad traversal bug (big thanks to @circuitsacul)
- Fixed common patterns:
CHARDECIMALFLOAT(and its derivatives)
Crossandra 1.3.0
Added
py.typed- more very explicit typehints
Crossandra 1.2.4
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
Fixed
- Crossandra now builds correctly for Python 3.10+ (big thanks to @Lunarmagpie for fixing that)
Crossandra 1.2.2
Fixed
- Fixed
Ignoredobjects being included in the output
Crossandra 1.2.1
Fixed
- Made
Rulea regular class to comply with mypyc