Ruby: prism/util/pm_state_stack.h File Reference

Ruby 3.3.4p94 (2024-07-09 revision be1089c8ec5ba40e09b1553e36b3174bf4014d9d)

Typedefs | Functions
pm_state_stack.h File Reference

A stack of boolean values. More...

`#include "prism/defines.h"`
`#include <stdbool.h>`
`#include <stdint.h>`

Go to the source code of this file.

## Typedefs
typedef uint32_t | pm_state_stack_t
| A struct that represents a stack of boolean values.

## Functions
void | pm_state_stack_push (pm_state_stack_t *stack, bool value)
| Pushes a value onto the stack.
void | pm_state_stack_pop (pm_state_stack_t *stack)
| Pops a value off the stack.
bool | pm_state_stack_p (pm_state_stack_t *stack)
| Returns the value at the top of the stack.

## Detailed Description

A stack of boolean values.

Definition in file pm_state_stack.h.

## Typedef Documentation

## ◆ pm_state_stack_t

typedef uint32_t pm_state_stack_t

A struct that represents a stack of boolean values.

Definition at line 17 of file pm_state_stack.h.

## Function Documentation

## ◆ pm_state_stack_p()

bool pm_state_stack_p | ( | pm_state_stack_t * | stack | ) |

Returns the value at the top of the stack.

Parameters

  stack | The stack to get the value from.

Returns
  The value at the top of the stack.

Definition at line 23 of file pm_state_stack.c.

## ◆ pm_state_stack_pop()

void pm_state_stack_pop | ( | pm_state_stack_t * | stack | ) |

Pops a value off the stack.

Parameters

  stack | The stack to pop the value off of.

Definition at line 15 of file pm_state_stack.c.

## ◆ pm_state_stack_push()

void pm_state_stack_push | ( | pm_state_stack_t * | stack,
|  | bool | value )

Pushes a value onto the stack.

Parameters

  stack | The stack to push the value onto.
  value | The value to push onto the stack.

Definition at line 7 of file pm_state_stack.c.