libpulsar
A modular compiler for the pulsar programming language
Loading...
Searching...
No Matches
operator.h
Go to the documentation of this file.
1
8#pragma once
9
10#include "def.h"
11#include "token.h" // enum ps_token_type
12
14
47
50
56const struct ps_operator* ps_token_type_get_op(enum ps_token_type type);
57
61// void ps_operator_register(const struct ps_operator* op);
Base definitions.
#define i32
Definition def.h:45
bool ps_token_type_is_op(enum ps_token_type type)
Whether type represents an operator token.
Definition operator.c:209
const struct ps_operator * ps_token_type_get_op(enum ps_token_type type)
Returns: the operator information associated with the given operator token.
Definition operator.c:213
i32 ps_operator_precedence_t
Definition operator.h:13
Operator information.
Definition operator.h:18
bool is_binary
Enables processing this operator as a binary operator.
Definition operator.h:25
ps_operator_precedence_t unary_prec
The operator's unary precedence.
Definition operator.h:42
bool is_left_associative
This defines operator assocativity as follows:
Definition operator.h:39
ps_operator_precedence_t binary_prec
The operator's binary precedence.
Definition operator.h:45
bool is_unary
Enables processing this operator as an unary operator.
Definition operator.h:32
Defines a token.
ps_token_type
The type of a token.
Definition token.h:18