structstd.zig.Loc[src]

Fields

line: usize
column: usize
source_line: []const u8

Does not include the trailing newline.

Functions

Functioneql[src]

pub fn eql(a: Loc, b: Loc) bool

Parameters

a: Loc
b: Loc

Source Code

Source code
pub fn eql(a: Loc, b: Loc) bool {
    return a.line == b.line and a.column == b.column and std.mem.eql(u8, a.source_line, b.source_line);
}

Source Code

Source code
pub const Loc = struct {
    line: usize,
    column: usize,
    /// Does not include the trailing newline.
    source_line: []const u8,

    pub fn eql(a: Loc, b: Loc) bool {
        return a.line == b.line and a.column == b.column and std.mem.eql(u8, a.source_line, b.source_line);
    }
}