$darkmode
Herb C Reference
lexer_peek_helpers.h File Reference
#include "lexer_struct.h"
#include "token_struct.h"
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Data Structures

struct  lexer_state_snapshot_T
 

Functions

char lexer_peek (const lexer_T *lexer, int offset)
 
bool lexer_peek_for_doctype (const lexer_T *lexer, int offset)
 
bool lexer_peek_for_xml_declaration (const lexer_T *lexer, int offset)
 
bool lexer_peek_for_cdata_start (const lexer_T *lexer, int offset)
 
bool lexer_peek_for_cdata_end (const lexer_T *lexer, int offset)
 
bool lexer_peek_for_html_comment_start (const lexer_T *lexer, int offset)
 
bool lexer_peek_for_html_comment_end (const lexer_T *lexer, int offset)
 
bool lexer_peek_erb_close_tag (const lexer_T *lexer, int offset)
 
bool lexer_peek_erb_dash_close_tag (const lexer_T *lexer, int offset)
 
bool lexer_peek_erb_percent_close_tag (const lexer_T *lexer, int offset)
 
bool lexer_peek_erb_end (const lexer_T *lexer, int offset)
 
char lexer_backtrack (const lexer_T *lexer, 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, 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_peek()

char lexer_peek ( const lexer_T lexer,
int  offset 
)

◆ lexer_peek_for_doctype()

bool lexer_peek_for_doctype ( const lexer_T lexer,
int  offset 
)

◆ lexer_peek_for_xml_declaration()

bool lexer_peek_for_xml_declaration ( const lexer_T lexer,
int  offset 
)

◆ lexer_peek_for_cdata_start()

bool lexer_peek_for_cdata_start ( const lexer_T lexer,
int  offset 
)

◆ lexer_peek_for_cdata_end()

bool lexer_peek_for_cdata_end ( const lexer_T lexer,
int  offset 
)

◆ lexer_peek_for_html_comment_start()

bool lexer_peek_for_html_comment_start ( const lexer_T lexer,
int  offset 
)

◆ lexer_peek_for_html_comment_end()

bool lexer_peek_for_html_comment_end ( const lexer_T lexer,
int  offset 
)

◆ lexer_peek_erb_close_tag()

bool lexer_peek_erb_close_tag ( const lexer_T lexer,
int  offset 
)

◆ lexer_peek_erb_dash_close_tag()

bool lexer_peek_erb_dash_close_tag ( const lexer_T lexer,
int  offset 
)

◆ lexer_peek_erb_percent_close_tag()

bool lexer_peek_erb_percent_close_tag ( const lexer_T lexer,
int  offset 
)

◆ lexer_peek_erb_end()

bool lexer_peek_erb_end ( const lexer_T lexer,
int  offset 
)

◆ lexer_backtrack()

char lexer_backtrack ( const lexer_T lexer,
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,
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 
)