|
9cae4461
|
2021-04-17T22:26:40
|
|
ESLint: Added quotes rule (#2835)
|
|
8fa8dd24
|
2020-11-25T22:59:40
|
|
Core: Fixed bug with greedy matching (#2632)
|
|
8bfcc819
|
2020-11-21T01:17:39
|
|
Tests: Better pretty print (#2600)
This is a major improvement for the pretty-printer.
The main change is that `TokenStreamTransformer.prettyprint` now takes a Prism token stream instead of a simplified token stream. This means that it has a lot more information to work with and it uses that information.
It mostly behaves like the old pretty-printer with 3 main differences:
1. Tokens that contain a nested token stream that only contains a single string are printed as one line.
Example: `["namespace", ["java"]]`
2. The pretty-printer can now glue tokens together so that they are printed in a single line.
Example: `["number", "100"], ["operator", ".."], ["number", "100"]`
3. Line breaks in the input code may now cause empty lines in the output. Previously, only blank strings containing more at least 2 line breaks produce empty lines. This helps readability as it groups tokens together.
|
|
40285203
|
2020-07-13T13:24:32
|
|
Core: Fixed greedy matching bug (#2032)
|
|
174ed103
|
2019-08-29T23:38:59
|
|
Core: Fixed greedy partial lookbehinds not working (#2030)
This fixes the bug that greedy patterns with a lookbehind group did not support other top-level alternatives (e.g. `/foo|(lookbehind)bar/`) causing an error when used.
|
|
e864d518
|
2019-08-29T23:24:17
|
|
Core: Fixed greedy targeting bug (#1932)
The `target` parameter defines the token which causes rematching. Rematching is done by recursively calling `matchGrammar` where `target` will be the current token name. The rematching is done if either a match was found or we reached the target token, whatever comes first.
The bug is that a token is identified by its name. But the name alone doesn't uniquely identify a token in a grammar because many tokens can have the same name (array).
This fixes this bug.
|