.TH erl_id_trans 3erl "stdlib 4.2" "Ericsson AB" "Erlang Module Definition" .SH NAME erl_id_trans \- An identity parse transform. .SH DESCRIPTION .LP This module performs an identity parse transformation of Erlang code\&. It is included as an example for users who wants to write their own parse transformers\&. If option \fI{parse_transform,Module}\fR\& is passed to the compiler, a user-written function \fIparse_transform/2\fR\& is called by the compiler before the code is checked for errors\&. .LP Before the function \fIparse_transform\fR\& is called, the Erlang Compiler checks if the parse transformation can handle abstract code with column numbers: If the function \fIparse_transform_info/0\fR\& is implemented and returns a map where the key \fIerror_location\fR\& is associated with the value \fIline\fR\&, the compiler removes column numbers from the abstract code before calling the parse transform\&. Otherwise, the compiler passes the abstract code on without modification\&. .SH EXPORTS .LP .B parse_transform(Forms, Options) -> Forms .br .RS .LP Types: .RS 3 Forms = [erl_parse:abstract_form() | erl_parse:form_info()] .br Options = [compile:option()] .br .RE .RE .RS .LP Performs an identity transformation on Erlang forms, as an example\&. .RE .LP .B parse_transform_info() -> Info .br .RS .LP Types: .RS 3 Info = #{\&'error_location\&' => \&'column\&' | \&'line\&'} .br .RE .RE .RS .LP Returns information about the parse transform itself\&. .RE .SH "PARSE TRANSFORMATIONS" .LP Parse transformations are used if a programmer wants to use Erlang syntax, but with different semantics\&. The original Erlang code is then transformed into other Erlang code\&. .LP .RS -4 .B Note: .RE Programmers are strongly advised not to engage in parse transformations\&. No support is offered for problems encountered\&. .SH "SEE ALSO" .LP \fIerl_parse(3erl)\fR\&, \fIcompile(3erl)\fR\&