innoconv.extensions.join_strings

Merge consecutive sequences of strings and spaces into a single string element.

The motivation behind this extension is to make the AST more readable and also to save space by compressing the representation. The actual appearance in a viewer should remain completely untouched.

This extension modifies the AST.

Example

Before {"t": "Str", "c": "Foo"},{"t": "Space"},{"t": "Str", "c": "b!"}]
After {"t": "Str", "c": "Foo b!"}]
class innoconv.extensions.join_strings.JoinStrings(*args, **kwargs)[source]

Bases: innoconv.extensions.abstract.AbstractExtension

Merge consecutive strings and spaces in the AST.

post_process_file(ast, _)[source]

Process AST in-place.