View Source Credo.Code.Token (Credo v1.7.11)

This module provides helper functions to analyse tokens returned by Credo.Code.to_tokens/1.

Summary

Functions

Returns true if the given token contains a line break.

Returns the position of a token in the form

Functions

eol?(token)

Returns true if the given token contains a line break.

position(token)

Returns the position of a token in the form

{line_no_start, col_start, line_no_end, col_end}

to_col_end(col_start, value, add \\ 0)