View Source Sourceror.Identifier (Sourceror v0.13.0)

Functions to identify an classify forms and quoted expressions.

Link to this section Summary

Functions

Checks if the given identifier is a binary op.

Checks if the given identifier is a pipeline operator.

Checks if the given identifier is an unary op.

Checks if the given atom is a valid module alias.

Link to this section Functions

Link to this macro

is_binary_op(op)

View Source (macro)
@spec is_binary_op(Macro.t()) :: Macro.t()

Checks if the given identifier is a binary op.

examples

Examples

iex> is_binary_op(:+)
true
Link to this macro

is_pipeline_op(op)

View Source (macro)

Checks if the given identifier is a pipeline operator.

examples

Examples

iex> is_pipeline_op(:|>)
true
Link to this macro

is_unary_op(op)

View Source (macro)
@spec is_unary_op(Macro.t()) :: Macro.t()

Checks if the given identifier is an unary op.

examples

Examples

iex> is_unary_op(:+)
true

Checks if the given atom is a valid module alias.

examples

Examples

iex> valid_alias?(Foo)
true
iex> valid_alias?(:foo)
false