libpulsar
A modular compiler for the pulsar programming language
Loading...
Searching...
No Matches
Macros | Functions | Variables
operator.c File Reference

Operator precedence and associativity data. More...

#include "operator.h"
#include "util/abort.h"

Go to the source code of this file.

Macros

#define OP_TKN_START   PS_TOKEN_EQ
 
#define OP_TKN_END   PS_TOKEN_BIT_XOR
 
#define OP_TKN_RANGE   (OP_TKN_END - OP_TKN_START + 1)
 

Functions

bool ps_token_type_is_op (enum ps_token_type type)
 Whether type represents an operator token.
 
const struct ps_operatorps_token_type_get_op (enum ps_token_type type)
 Returns: the operator information associated with the given operator token.
 

Variables

struct ps_operator operators [OP_TKN_RANGE]
 

Detailed Description

Operator precedence and associativity data.

Author
Ethan Uppal

Definition in file operator.c.

Macro Definition Documentation

◆ OP_TKN_END

#define OP_TKN_END   PS_TOKEN_BIT_XOR

Definition at line 12 of file operator.c.

◆ OP_TKN_RANGE

#define OP_TKN_RANGE   (OP_TKN_END - OP_TKN_START + 1)

Definition at line 13 of file operator.c.

◆ OP_TKN_START

#define OP_TKN_START   PS_TOKEN_EQ

Definition at line 11 of file operator.c.

Function Documentation

◆ ps_token_type_get_op()

const struct ps_operator * ps_token_type_get_op ( enum ps_token_type  type)

Returns: the operator information associated with the given operator token.

Precondition
ps_token_type_is_op(type) == true.

Definition at line 213 of file operator.c.

◆ ps_token_type_is_op()

bool ps_token_type_is_op ( enum ps_token_type  type)

Whether type represents an operator token.

Definition at line 209 of file operator.c.

Variable Documentation

◆ operators

struct ps_operator operators[OP_TKN_RANGE]

Definition at line 16 of file operator.c.