Changelog#

v1.7.0 (2023-08-03)#

Feature#

v1.6.0 (2023-08-02)#

Feature#

v1.5.0 (2023-01-05)#

Feature#

  • Make it possible to swap the underlying regex module (b47995e)

Fix#

  • Allow expect_eof() to succeed even if the "eof" token was already consumed (7a8e799)

  • Update typing (0ce06c7)

v1.4.2 (2022-06-02)#

Fix#

v1.4.1 (2022-05-02)#

Fix#

  • Take into account repeating newlines before emitting dedent tokens (109552c)

v1.4.0 (2022-04-12)#

Feature#

v1.3.4 (2022-04-06)#

Fix#

  • Better mechanism for tracking alternative errors (4e0c3f2)

v1.3.3 (2022-04-02)#

Fix#

  • Keep track of alternative errors (9bee458)

v1.3.2 (2022-02-19)#

Fix#

v1.3.1 (2021-12-06)#

Fix#

  • Sort expected patterns in explanation (c1c26cb)

v1.3.0 (2021-12-01)#

Feature#

  • Make it possible to copy the stream (5a4a41c)

v1.2.7 (2021-11-30)#

Fix#

  • Get() method was returning a list instead of a single token (accf784)

v1.2.6 (2021-11-25)#

Fix#

  • Prevent duplicating expected patterns (10cec04)

v1.2.5 (2021-11-25)#

Fix#

  • Simplify expected_patterns merging (ad10e50)

v1.2.4 (2021-11-25)#

Fix#

  • Properly prioritize errors that occur later in the stream (a665924)

v1.2.3 (2021-10-20)#

Fix#

  • Set invalid syntax location for unexpected token (4231809)

v1.2.2 (2021-10-09)#

Fix#

  • Handle windows line endings (068144d)

v1.2.1 (2021-09-24)#

Fix#

  • With_horizontal_offset doesn't modify unkown location anymore (e17f897)

v1.2.0 (2021-09-19)#

Feature#

  • Make it possible to know if a checkpoint was rolled back (0765e96)

v1.1.0 (2021-09-16)#

Feature#

Fix#

  • Do not register the first alternative exception twice (1bb7102)

v1.0.5 (2021-09-15)#

Fix#

  • Make it possible to use None to disable previous rules (66e468a)

v1.0.4 (2021-09-14)#

Fix#

  • Add period to all error messages (c1c32b0)

v1.0.3 (2021-09-14)#

Fix#

  • Don't show token value if it's empty (6337bfd)

v1.0.2 (2021-09-14)#

Fix#

  • Don't detect indent when the line is blank (175e02e)

  • Properly handle full dedent (04b9dab)

  • Add eof and invalid tokens (264a398)

v1.0.1 (2021-09-08)#

Fix#

  • Handle non SourceLocation end_location in set_location (f16b378)

v1.0.0 (2021-09-08)#

Feature#

  • Move SourceLocation into its own module (95aabae)

Breaking#

  • remove InvalidSyntax.set_location in favor of the general-purpose setlocation function (95aabae)

v0.7.5 (2021-09-04)#

Fix#

  • Combine unexpected token patterns when using the choose() method (b8665e8)

v0.7.4 (2021-08-30)#

Fix#

  • Tweak pattern explanation when there are a lot of token types (0a9e007)

v0.7.3 (2021-08-30)#

Fix#

  • Properly restore previous regex when syntax changes (aeae860)

v0.7.2 (2021-08-29)#

Fix#

  • Raise IndexError for negative indices for current and previous tokens (7b5010b)

v0.7.1 (2021-08-28)#

Fix#

  • Make it possible to emit errors from tokens (b97ab2d)

v0.7.0 (2021-07-28)#

Feature#

  • Add stream.alternative(bool) (3adef70)

v0.6.2 (2021-07-23)#

Fix#

  • Don't capture newlines in whitespace tokens (d17783e)

v0.6.1 (2021-07-22)#

Fix#

  • Handle pattern explanation with no pattern (1de098b)

v0.6.0 (2021-07-22)#

Feature#

  • Add arbitrary user data (105553f)

v0.5.0 (2021-06-24)#

Feature#

  • Add alternative method and choose method (0794172)

Fix#

  • Swallow syntax errors when checkpoint is not committed yet (54e77ef)

  • Don't raise UnexpectedEOF if peek_until without patterns (bcee95a)

v0.4.1 (2021-06-17)#

Fix#

v0.4.0 (2021-06-17)#

Feature#

  • Add collect_any and docs (2d35ba3)

Fix#

  • Take into account indentation_skip (cbfe3e3)

v0.3.0 (2021-06-16)#

Feature#

Fix#

  • Accurate end_colno when the token contains newlines (3cdb432)

  • Collect with no patterns properly defers to the main iterator (3c6000a)

Documentation#

v0.2.0 (2021-06-14)#

Feature#

Fix#

Documentation#