libpulsar
A modular compiler for the pulsar programming language
Loading...
Searching...
No Matches
loc.h
Go to the documentation of this file.
1
8#pragma once
9
10#include "def.h"
11#include "util/print.h"
12
22
24
26struct ps_loc PS_LOC_NONE(void);
27
29bool ps_is_loc_none(const struct ps_loc* loc);
Base definitions.
#define STR
Definition def.h:40
#define usize
Definition def.h:50
static void usize struct ps_loc loc
Definition lexer.h:76
struct ps_loc PS_LOC_NONE(void)
Represents the absence token location.
bool ps_is_loc_none(const struct ps_loc *loc)
Whether the token location is an not actual location.
Definition loc.c:20
#define PS_PRINT_DECL(T)
Definition print.h:9
Represents a token location.
Definition loc.h:16
STR filename
The file where the token is from.
Definition loc.h:17
usize pos
The token's position in the text.
Definition loc.h:20
usize line
The line number where the token is found.
Definition loc.h:18
usize col
The column number where the token starts.
Definition loc.h:19