Herb C Reference
Loading...
Searching...
No Matches
ast_node.c File Reference
#include "include/ast_node.h"
#include "include/ast_nodes.h"
#include "include/errors.h"
#include "include/token.h"
#include "include/util.h"
#include <prism.h>
#include <stdio.h>
#include <stdlib.h>

Functions

size_t ast_node_sizeof (void)
 
void ast_node_init (AST_NODE_T *node, const ast_node_type_T type, position_T *start, position_T *end, array_T *errors)
 
AST_LITERAL_NODE_Tast_literal_node_init_from_token (const token_T *token)
 
ast_node_type_T ast_node_type (const AST_NODE_T *node)
 
size_t ast_node_errors_count (const AST_NODE_T *node)
 
array_Tast_node_errors (const AST_NODE_T *node)
 
void ast_node_append_error (const AST_NODE_T *node, ERROR_T *error)
 
void ast_node_set_start (AST_NODE_T *node, position_T *position)
 
void ast_node_set_end (AST_NODE_T *node, position_T *position)
 
void ast_node_set_start_from_token (AST_NODE_T *node, const token_T *token)
 
void ast_node_set_end_from_token (AST_NODE_T *node, const token_T *token)
 
void ast_node_set_positions_from_token (AST_NODE_T *node, const token_T *token)
 
bool ast_node_is (const AST_NODE_T *node, const ast_node_type_T type)
 

Function Documentation

◆ ast_node_sizeof()

size_t ast_node_sizeof ( void  )

◆ ast_node_init()

void ast_node_init ( AST_NODE_T node,
const ast_node_type_T  type,
position_T start,
position_T end,
array_T errors 
)

◆ ast_literal_node_init_from_token()

AST_LITERAL_NODE_T * ast_literal_node_init_from_token ( const token_T token)

◆ ast_node_type()

ast_node_type_T ast_node_type ( const AST_NODE_T node)

◆ ast_node_errors_count()

size_t ast_node_errors_count ( const AST_NODE_T node)

◆ ast_node_errors()

array_T * ast_node_errors ( const AST_NODE_T node)

◆ ast_node_append_error()

void ast_node_append_error ( const AST_NODE_T node,
ERROR_T error 
)

◆ ast_node_set_start()

void ast_node_set_start ( AST_NODE_T node,
position_T position 
)

◆ ast_node_set_end()

void ast_node_set_end ( AST_NODE_T node,
position_T position 
)

◆ ast_node_set_start_from_token()

void ast_node_set_start_from_token ( AST_NODE_T node,
const token_T token 
)

◆ ast_node_set_end_from_token()

void ast_node_set_end_from_token ( AST_NODE_T node,
const token_T token 
)

◆ ast_node_set_positions_from_token()

void ast_node_set_positions_from_token ( AST_NODE_T node,
const token_T token 
)

◆ ast_node_is()

bool ast_node_is ( const AST_NODE_T node,
const ast_node_type_T  type 
)