---
name: "erl_id_trans"
section: "3erl"
platform: "linux"
package: "erlang-manpages"
version: "1:25.2.3+dfsg-1+deb12u4"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/erl_id_trans"
---

# erl\_id\_trans(3erl)

An identity parse transform.

## NAME

erl\_id\_trans - An identity parse transform.

## DESCRIPTION

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 *{parse\_transform,Module}* is passed to the compiler, a user-written function *parse\_transform/2* is called by the compiler before the code is checked for errors.

Before the function *parse\_transform* is called, the Erlang Compiler checks if the parse transformation can handle abstract code with column numbers: If the function *parse\_transform\_info/0* is implemented and returns a map where the key *error\_location* is associated with the value *line*, the compiler removes column numbers from the abstract code before calling the parse transform. Otherwise, the compiler passes the abstract code on without modification.

## EXPORTS

**parse\_transform(Forms, Options) -\> Forms**\

Types:

Forms = \[erl\_parse:abstract\_form() \| erl\_parse:form\_info()\]\
 Options = \[compile:option()\]\

Performs an identity transformation on Erlang forms, as an example.

**parse\_transform\_info() -\> Info**\

Types:

Info = #{'error\_location' =\> 'column' \| 'line'}\

Returns information about the parse transform itself.

## PARSE TRANSFORMATIONS

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.

**Note:**

Programmers are strongly advised not to engage in parse transformations. No support is offered for problems encountered.

## SEE ALSO

*[erl\_parse(3erl)](/erl_parse/3erl.md)*, *[compile(3erl)](/compile/3erl.md)*
