Lavash.LiveView.Compiler (Lavash v0.4.0-rc.3)

Copy Markdown View Source

Utility functions for LiveView compilation.

LiveView callbacks are generated by Lavash.LiveView.Transformers.CompileLiveView. This module provides shared helper functions used by that transformer.

Summary

Functions

Collect optimistic state fields — both fields declared optimistic and those implicitly touched by an optimistic action.

Generate actions from optimistic_action macro definitions.

Generate synthetic setter actions for state fields with setter: true or optimistic: true.

Functions

collect_optimistic_fields(module)

Collect optimistic state fields — both fields declared optimistic and those implicitly touched by an optimistic action.

generate_optimistic_actions(module)

Generate actions from optimistic_action macro definitions.

generate_setter_actions(module)

Generate synthetic setter actions for state fields with setter: true or optimistic: true.