Parce

Latest version: v0.32.0

Safety actively analyzes 682404 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 6

0.14.0

- documentation updates and improvements
- removed Context.source and Token.target (and their Query counterparts)
- removed get_group_* functions from tree.py, added them as methods to
GroupToken
- Cursor.start is now Cursor.pos (in line with Token and Block etc.)
- added document block api
- added Document.token, Cursor.token and Cursor.tokens, etc.
- Context.find_* and Context.tokens_range() are more robust now
- added indent module
- Event.tokens is now Event.lexemes to avoid confusion

0.13.0

- documentation updates and improvements
- added rule.anyof() and rule.gselect()
- added the lexicon consume argument, which puts a switching token in the
target context
- added transform.Items.grouped() and .objects()
- TreeBuilder.replace_pos() now gets the index as second arg, not the slice

0.12.0

- the built-in CSS parser now uses CssTransform to parse a CSS file instead
of using the query module
- added Transformer.connect_treebuilder() to keep a transformed result auto-
matically up-to-date.
- a BackgroundTransformer was added
- the parent attribute of a tree Node now uses a weak reference
- the group attribute of a _GroupToken is not a tuple of _GroupTokens anymore,
it's just an integer value indicating the index of the token in the group.
This is done to annihilate circular references.

0.11.0

- fix NameError: name 'Escape' is not defined in parce/css.py
- in the bundled languages __all__ is defined and from import * is not used
anymore
- documentation improvements

0.10.0

- dynamic rule item infrastructure completely rewritten, rule items
are simpler, more powerful and fine-grained
- some modules have been renamed:
action → StandardAction is now in standardaction, ActionItem in ruleitem
stdactions → action
- the rule item helpers are not in the parce namepace, but in parce.rule
- the standard actions are not in the parce namespace, but in parce.action
- parce.document.Document now inherits from Observable and emits events
- fixed: AttributeError: 'str' object has no attribute 'IfArg'

0.9.0

- initial version of a transform module, that can transform a parce tree
to any structure you want using a Transform class, potentionally using
caching on contexts
- added util.Observable, and use it in TreeBuilder to emit events
- added unicharclass module
- added using(), like in Pygments, it lexes a match with another lexicon
- added JavaScript parser
- added Python console session parser (with prompts)
- added basic GNU Texinfo parser
- added groff/troff parser, even includes LilyPond (as per the groff manual!)
- fixed parsing resume when first part of a match was skipped or not used
(e.g. r'( )(")', bygroup(skip, String) or r' (")', bygroup(String))

Page 4 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.