Ruby: prism/util/pm_state_stack.h Source File

Ruby 3.3.5p100 (2024-09-03 revision ef084cc8f4958c1b6e4ead99136631bef6d8ddba)

pm_state_stack.h
Go to the documentation of this file.
1
6#ifndef PRISM_STATE_STACK_H
7#define PRISM_STATE_STACK_H
8
9#include "prism/defines.h"
10
11#include <stdbool.h>
12#include <stdint.h>
13
17 typedef uint32_t pm_state_stack_t;
18
25void pm_state_stack_push(pm_state_stack_t *stack, bool value);
26
32void pm_state_stack_pop(pm_state_stack_t *stack);
33
40bool pm_state_stack_p(pm_state_stack_t *stack);
41
42#endif
pm_state_stack_t
uint32_t pm_state_stack_t
A struct that represents a stack of boolean values.
Definition pm_state_stack.h:17
pm_state_stack_pop
void pm_state_stack_pop(pm_state_stack_t *stack)
Pops a value off the stack.
Definition pm_state_stack.c:15
pm_state_stack_push
void pm_state_stack_push(pm_state_stack_t *stack, bool value)
Pushes a value onto the stack.
Definition pm_state_stack.c:7
pm_state_stack_p
bool pm_state_stack_p(pm_state_stack_t *stack)
Returns the value at the top of the stack.
Definition pm_state_stack.c:23
defines.h
Macro definitions used throughout the prism library.
stdbool.h
C99 shim for <stdbool.h>