Macro nom::lib::std::prelude::v1::rust_2015::column1.0.0[][src]

macro_rules! column {
     => { ... };
}

Expands to the column number at which it was invoked.

With line! and file!, these macros provide debugging information for developers about the location within the source.

The expanded expression has type u32 and is 1-based, so the first column in each line evaluates to 1, the second to 2, etc. This is consistent with error messages by common compilers or popular editors. The returned column is not necessarily the line of the column! invocation itself, but rather the first macro invocation leading up to the invocation of the column! macro.

Examples

let current_col = column!();
println!("defined on column: {}", current_col);