$darkmode
Herb C Reference
lexer_peek_helpers.c File Reference
#include "include/lexer_peek_helpers.h"
#include "include/lexer.h"
#include "include/lexer_struct.h"
#include "include/macros.h"
#include "include/token.h"
#include <ctype.h>
#include <stdbool.h>

Functions

char lexer_backtrack (const lexer_T *lexer, const int offset)
 
char lexer_peek (const lexer_T *lexer, const int offset)
 
bool lexer_peek_for (const lexer_T *lexer, const int offset, const char *pattern, const bool case_insensitive)
 
bool lexer_peek_for_doctype (const lexer_T *lexer, const int offset)
 
bool lexer_peek_for_xml_declaration (const lexer_T *lexer, const int offset)
 
bool lexer_peek_for_cdata_start (const lexer_T *lexer, const int offset)
 
bool lexer_peek_for_cdata_end (const lexer_T *lexer, const int offset)
 
bool lexer_peek_for_html_comment_start (const lexer_T *lexer, const int offset)
 
bool lexer_peek_for_html_comment_end (const lexer_T *lexer, const int offset)
 
bool lexer_peek_erb_close_tag (const lexer_T *lexer, const int offset)
 
bool lexer_peek_erb_dash_close_tag (const lexer_T *lexer, const int offset)
 
bool lexer_peek_erb_percent_close_tag (const lexer_T *lexer, const int offset)
 
bool lexer_peek_erb_end (const lexer_T *lexer, const int offset)
 
bool lexer_peek_for_token_type_after_whitespace (lexer_T *lexer, token_type_T token_type)
 
bool lexer_peek_for_close_tag_start (const lexer_T *lexer, const int offset)
 
lexer_state_snapshot_T lexer_save_state (lexer_T *lexer)
 
void lexer_restore_state (lexer_T *lexer, lexer_state_snapshot_T snapshot)
 

Function Documentation

◆ lexer_backtrack()

char lexer_backtrack ( const lexer_T lexer,
const int  offset 
)

◆ lexer_peek()

char lexer_peek ( const lexer_T lexer,
const int  offset 
)

◆ lexer_peek_for()

bool lexer_peek_for ( const lexer_T lexer,
const int  offset,
const char *  pattern,
const bool  case_insensitive 
)

◆ lexer_peek_for_doctype()

bool lexer_peek_for_doctype ( const lexer_T lexer,
const int  offset 
)

◆ lexer_peek_for_xml_declaration()

bool lexer_peek_for_xml_declaration ( const lexer_T lexer,
const int  offset 
)

◆ lexer_peek_for_cdata_start()

bool lexer_peek_for_cdata_start ( const lexer_T lexer,
const int  offset 
)

◆ lexer_peek_for_cdata_end()

bool lexer_peek_for_cdata_end ( const lexer_T lexer,
const int  offset 
)

◆ lexer_peek_for_html_comment_start()

bool lexer_peek_for_html_comment_start ( const lexer_T lexer,
const int  offset 
)

◆ lexer_peek_for_html_comment_end()

bool lexer_peek_for_html_comment_end ( const lexer_T lexer,
const int  offset 
)

◆ lexer_peek_erb_close_tag()

bool lexer_peek_erb_close_tag ( const lexer_T lexer,
const int  offset 
)

◆ lexer_peek_erb_dash_close_tag()

bool lexer_peek_erb_dash_close_tag ( const lexer_T lexer,
const int  offset 
)

◆ lexer_peek_erb_percent_close_tag()

bool lexer_peek_erb_percent_close_tag ( const lexer_T lexer,
const int  offset 
)

◆ lexer_peek_erb_end()

bool lexer_peek_erb_end ( const lexer_T lexer,
const int  offset 
)

◆ lexer_peek_for_token_type_after_whitespace()

bool lexer_peek_for_token_type_after_whitespace ( lexer_T lexer,
token_type_T  token_type 
)

◆ lexer_peek_for_close_tag_start()

bool lexer_peek_for_close_tag_start ( const lexer_T lexer,
const int  offset 
)

◆ lexer_save_state()

lexer_state_snapshot_T lexer_save_state ( lexer_T lexer)

◆ lexer_restore_state()

void lexer_restore_state ( lexer_T lexer,
lexer_state_snapshot_T  snapshot 
)