Calmjs.parse

Latest version: v1.3.1

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

Scan your dependencies

Page 2 of 3

1.2.0

------------------

- Partial support for parsing of comments. Currently not all comments
will be captured during parsing, due to the desire to simplify access
of them through the ``asttypes.Node`` instances with the generic
``comments`` attribute provided by it. [
`24 <https://github.com/calmjs/calmjs.parse/issues/24>`_
]

- Enabled by passing ``with_comments=True`` to the parser..
- The limitation lies in the fact that if a node has multiple token
slots (e.g. ``if...else``), the comments that lie immediate before
the first will be captured, while the comments that lie immediate to
the subsequent ones will be omitted. The fix would involve
providing a full syntax tree node types, and that the parser rules
would need to be implemented in a more amenable manner such that the
generation of such could be done.
- All comments that lie immediately before the node are accessible
using the ``comments`` attribute.
- These comments nodes will not be yielded via the children() method.
- Various features and methods have been updated to account for
comments. Notably, sourcemap generation will be able to deal with
source fragments that contain newlines provided that both colno and
lineno are provided.

- Correctly fail on incorrect hexadecimal/unicode escape sequences while
reporting the specific character location; also report on the starting
position of an unterminated string literal. [
`23 <https://github.com/calmjs/calmjs.parse/issues/23>`_
]

1.1.3

------------------

- Correct issues with certain non-optional spaces being omitted for the
minify print cases, which caused malformed outputs. [
`22 <https://github.com/calmjs/calmjs.parse/issues/22>`_
]

1.1.2

------------------

- Default repr on synthetic nodes or nodes without column or row number
assigned should no longer error. [
`20 <https://github.com/calmjs/calmjs.parse/issues/20>`_
]
- The same line terminator regex introduced in 1.1.0 used for line
continuation in strings now applied to the line terminator pattern to
the lexer, such that the line numbering is corrected for the Windows
specific <CR><LF> sequence. [
`21 <https://github.com/calmjs/calmjs.parse/issues/21>`_
]

1.1.1

------------------

- Ensure that the accounting of layout rule chunks is done correctly in
the case where layout handlers specified a tuple of layout rules for
combined handling. [
`19 <https://github.com/calmjs/calmjs.parse/issues/19>`_
]

- The issue caused by this error manifest severely in the case where
multiple layout rule tokens are produced in a manner that repeats
a pattern that also have a layout handler rule for them, which
does not typically happen for normal code with the standard printers
(as layout chunks are many and they generally do not result in a
repeated pattern that gets consumed). However this is severely
manifested in the case of minified output with semicolons dropped,
as that basically guarantee that any series of closing blocks that
fit the pattern to be simply dropped.

1.1.0

------------------

- Correct the implementation of line continuation in strings. This also
meant a change in the minify unparser so that it will continue to
remove the line continuation sequences. [
`16 <https://github.com/calmjs/calmjs.parse/issues/16>`_
]

- Correct the implementation of ASI (automatic semicolon insertion) by
introducing a dedicated token type, such that the production of
empty statement can no longer happen and that distinguishes it from
production of statements that should not have ASI applied, such that
incorrectly successful parsing due to this issue will no longer
result. [
`18 <https://github.com/calmjs/calmjs.parse/issues/18>`_
`rspivak/slimit29 <https://github.com/rspivak/slimit/issues/29>`_
`rspivak/slimit101 <https://github.com/rspivak/slimit/issues/101>`_
]

1.0.1

------------------

- Ensure that the es5 Unparser pass on the prewalk_hooks argument in
its constructor.
- Minor packaging fixes; also include optimization modules for ply-3.11.

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.