uwiger/parse_trans

Parse transform utilities for Erlang

Erlang

235

111 commits

updated May 14, 2025

See the code

README

The parse_trans application

Authors: Ulf Wiger (ulf@wiger.net).

Parse_transform utilities

Build Status Hex pm

Introduction

Parse_trans was written in order to capture some useful patterns in parse transformation and code generation for Erlang.

Most notably, perhaps, the module exprecs generates standardized accessor functions for records, and ct_expand makes it possible to evaluate an expression at compile-time and substitute the result as a compile-time constant.

Less known modules, perhaps:

  • parse_trans_pp can be called with escript to pretty-print source from debug-compiled .beam files.
  • parse_trans_codegen provides pseudo-functions that can be used for simple code generation.
  • parse_trans provides various helper functions for traversing code and managing complex parse transforms

Modules

Contributors

uwiger

77 commits

fenollp

6 commits

essen

2 commits

uabboli

2 commits

Languages

Erlang

99.9%

uwiger/parse_trans

Parse transform utilities for Erlang

Erlang

235

111 commits

updated May 14, 2025

See the code

README

The parse_trans application

Authors: Ulf Wiger (ulf@wiger.net).

Parse_transform utilities

Build Status Hex pm

Introduction

Parse_trans was written in order to capture some useful patterns in parse transformation and code generation for Erlang.

Most notably, perhaps, the module exprecs generates standardized accessor functions for records, and ct_expand makes it possible to evaluate an expression at compile-time and substitute the result as a compile-time constant.

Less known modules, perhaps:

  • parse_trans_pp can be called with escript to pretty-print source from debug-compiled .beam files.
  • parse_trans_codegen provides pseudo-functions that can be used for simple code generation.
  • parse_trans provides various helper functions for traversing code and managing complex parse transforms

Modules

Contributors

uwiger

77 commits

fenollp

6 commits

essen

2 commits

uabboli

2 commits

Languages

Erlang

99.9%