libmya 0.1.0
Library to parse Mya language.
Loading...
Searching...
No Matches
tkstack.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdbool.h>
4
5#include "types/err.h"
6#include "types/tkstack.h"
7
13void
15
21void
23
30void
32
44
55
64bool
A struct representing a dynamic stack.
Definition aststack.h:12
Struct for a Mya token.
Definition token.h:34
token_t * tkstack_peek(tkstack_t *stack)
Peeks the value on top of the stack without removing it.
Definition tkstack.c:45
bool tkstack_isempty(tkstack_t *stack)
Check if the given stack is empty.
Definition tkstack.c:55
token_t * tkstack_pop(tkstack_t *stack)
Pop a value from the stack.
Definition tkstack.c:35
void tkstack_close(tkstack_t *stack)
Closes the given stack.
Definition tkstack.c:20
void tkstack_init(tkstack_t *stack)
Initializes the given stack.
Definition tkstack.c:11
void tkstack_push(tkstack_t *stack, token_t *token)
Push a new value on the stack.
Definition tkstack.c:27
struct tkstack tkstack_t
A struct representing a dynamic stack of token_t pointers.
struct token token_t
Struct for a Mya token.