jasy.script.output package

Submodules

jasy.script.output.Compressor module

class jasy.script.output.Compressor.Compressor(format=None)[source]

Bases: object

compress(node)[source]
type_array_comp(node)[source]
type_array_init(node)[source]
type_assign(node)[source]
type_block(node)[source]
type_break(node)[source]
type_call(node)[source]
type_comma(node)[source]
type_comp_tail(node)[source]

Comprehensions Tails.

type_const(node)[source]
type_continue(node)[source]
type_declaration(node)[source]
type_do(node)[source]
type_exception(node)[source]
type_for(node)[source]
type_for_in(node)[source]
type_function(node)[source]
type_generator(node)[source]

Generator Expression.

type_getter(node)[source]
type_hook(node)[source]

aka ternary operator.

type_identifier(node)[source]
type_if(node)[source]
type_in(node)[source]
type_index(node)[source]
type_instanceof(node)[source]
type_label(node)[source]
type_let(node)[source]
type_let_block(node)[source]
type_list(node)[source]
type_new_with_args(node)[source]
type_number(node)[source]
type_object_init(node)[source]
type_property_init(node)[source]
type_regexp(node)[source]
type_return(node)[source]
type_script(node)[source]
type_semicolon(node)[source]
type_setter(node)[source]
type_string(node)[source]
type_switch(node)[source]
type_throw(node)[source]
type_try(node)[source]
type_var(node)[source]
type_while(node)[source]

jasy.script.output.Formatting module

class jasy.script.output.Formatting.Formatting(*args)[source]

Bases: jasy.core.FlagSet.FlagSet

Configures an formatting object which can be used to compress classes afterwards.

The optimization set is frozen after initialization which also generates the unique key based on the given formatting options.

jasy.script.output.Optimization module

exception jasy.script.output.Optimization.Error(msg)[source]

Bases: Exception

Error object which is raised whenever an optimization could not be applied correctly.

class jasy.script.output.Optimization.Optimization(*args)[source]

Bases: jasy.core.FlagSet.FlagSet

Configures an optimization object which can be used to compress classes afterwards.

The optimization set is frozen after initialization which also generates the unique key based on the given optimizations.

apply(tree)[source]

Applies the configured optimizations to the given node tree.

Modifies the tree in-place to be sure to have a deep copy if you need the original one. It raises an error instance whenever any optimization could not be applied to the given tree.

Module contents