<commit_before>## next

- Tokenizer
    - Changed `tokenize()` to take a function as second argument, which will be called for every token. No stream instance is creating when second argument is ommited.
    - Changed `TokenStream#getRawLength()` to take second parameter as a function (rule) that check a char code to stop a scanning
    - Added `TokenStream#forEachToken(fn)` method
    - Removed `TokenStream#skipWS()` method
    - Removed `TokenStream#getTokenLength()` method
- Parser
    - Changed selector parsing to produce `{ type: 'Combinator', name: ' ' }` node instead of `WhiteSpace` node
    - Don't produce `WhiteSpace` nodes anymore, with the single exception: a custom property declaration with a single white space token as a value
    - Parser adds a whitespace to `+` and `-` operators, when a whitespace is before and/or after an operator
    - Exposed parser's inner configuration as `parse.config`
    - Added `consumeUntilBalanceEnd()`, `consumeUntilLeftCurlyBracket()`, `consumeUntilLeftCurlyBracketOrSemicolon()`, `consumeUntilExclamationMarkOrSemicolon()` and `consumeUntilSemicolonIncluded()` methods to parser's inner API to use with `Raw` instead of `Raw.mode`
- Generator
    - Generator is now determines itself when a white space required between emitting tokens
    - Changed `chunk()` handler to `token()` (output a single token) and `tokenize()` (split a string into tokens and output each of them)
    - Added `mode` option for `generate()` to specify a mode of token separation: `spec` or `safe` (by default)
    - Added `emit(token, type, auto)` handler as implementation specific token processor
    - Changed `Nth` serialiation to serialize `+n` as `n`
- Lexer
    - Removed `Lexer#matchDeclaration()` method
    - Fixed `Lexer#dump()` to dump atrules syntaxes as well
- List
    - Changed `List` to be iterable (iterates data)<commit_msg>Remove changes made in 1.x<commit_after>## next

- Tokenizer
    - Changed `tokenize()` to take a function as second argument, which will be called for every token. No stream instance is creating when second argument is ommited.
    - Changed `TokenStream#getRawLength()` to take second parameter as a function (rule) that check a char code to stop a scanning
    - Added `TokenStream#forEachToken(fn)` method
    - Removed `TokenStream#skipWS()` method
    - Removed `TokenStream#getTokenLength()` method
- Parser
    - Changed selector parsing to produce `{ type: 'Combinator', name: ' ' }` node instead of `WhiteSpace` node
    - Don't produce `WhiteSpace` nodes anymore, with the single exception: a custom property declaration with a single white space token as a value
    - Parser adds a whitespace to `+` and `-` operators, when a whitespace is before and/or after an operator
    - Exposed parser's inner configuration as `parse.config`
    - Added `consumeUntilBalanceEnd()`, `consumeUntilLeftCurlyBracket()`, `consumeUntilLeftCurlyBracketOrSemicolon()`, `consumeUntilExclamationMarkOrSemicolon()` and `consumeUntilSemicolonIncluded()` methods to parser's inner API to use with `Raw` instead of `Raw.mode`
- Generator
    - Generator is now determines itself when a white space required between emitting tokens
    - Changed `chunk()` handler to `token()` (output a single token) and `tokenize()` (split a string into tokens and output each of them)
    - Added `mode` option for `generate()` to specify a mode of token separation: `spec` or `safe` (by default)
    - Added `emit(token, type, auto)` handler as implementation specific token processor
    - Changed `Nth` serialiation to serialize `+n` as `n`
- Lexer
    - Removed `Lexer#matchDeclaration()` method
- List
    - Changed `List` to be iterable (iterates data)
{'fraction_non_alphanumeric': 0.09130083490438998, 'fraction_numerical': 0.00026932399676811203, 'mean_word_length': 4.305714285714286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4171090', 'n_tokens_mistral': 1049, 'n_tokens_neox': 1005, 'n_words': 443}