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 remains identical.

This extension modifies the AST.


{"t":"Str","c":"Foo"},{"t":"Space"},{"t":"Str","c":"bar"}]{"t":"Str","c":"Foo bar"}]

class innoconv.ext.join_strings.JoinStrings(*args, **kwargs)[source]

Bases: innoconv.ext.abstract.AbstractExtension

Merge consecutive strings and spaces in the AST.

post_process_file(ast, _)[source]

Process AST in-place.