Herb C Reference
Loading...
Searching...
No Matches
token.c File Reference
#include "include/token.h"
#include "include/position.h"
#include "include/range.h"
#include "include/token_struct.h"
#include "include/util.h"
#include "include/util/hb_buffer.h"
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Functions

token_Ttoken_init (hb_string_T value, const token_type_T type, lexer_T *lexer)
 
const char * token_type_to_string (const token_type_T type)
 
const char * token_type_to_friendly_string (const token_type_T type)
 
char * token_types_to_friendly_string_valist (token_type_T first_token, va_list args)
 
char * token_types_to_friendly_string_va (token_type_T first_token,...)
 
hb_string_T token_to_string (const token_T *token)
 
token_Ttoken_copy (token_T *token, hb_allocator_T *allocator)
 
bool token_value_empty (const token_T *token)
 
void token_free (token_T *token, hb_allocator_T *allocator)
 

Function Documentation

◆ token_init()

token_T * token_init ( hb_string_T  value,
const token_type_T  type,
lexer_T lexer 
)

◆ token_type_to_string()

const char * token_type_to_string ( const token_type_T  type)

◆ token_type_to_friendly_string()

const char * token_type_to_friendly_string ( const token_type_T  type)

◆ token_types_to_friendly_string_valist()

char * token_types_to_friendly_string_valist ( token_type_T  first_token,
va_list  args 
)

◆ token_types_to_friendly_string_va()

char * token_types_to_friendly_string_va ( token_type_T  first_token,
  ... 
)

◆ token_to_string()

hb_string_T token_to_string ( const token_T token)

◆ token_copy()

token_T * token_copy ( token_T token,
hb_allocator_T *  allocator 
)

◆ token_value_empty()

bool token_value_empty ( const token_T token)

◆ token_free()

void token_free ( token_T token,
hb_allocator_T *  allocator 
)