Function rcl_lexer_lookahead2_peek2
Defined in File lexer_lookahead.h
Function Documentation
-
rcl_ret_t rcl_lexer_lookahead2_peek2(rcl_lexer_lookahead2_t *buffer, rcl_lexeme_t *next_type1, rcl_lexeme_t *next_type2)
Look ahead at the next two lexemes in the string.
Repeated calls to peek2 will return the same two lexemes. A parser that deems the next two lexemes as valid must accept twice to advance lexing.
Attribute
Adherence
Allocates Memory
Yes [1]
Thread-Safe
No
Uses Atomics
No
Lock-Free
Yes
See also
- Parameters:
buffer – [in] the lookahead2 buffer being used to analyze a string.
next_type1 – [out] an output variable for the next lexeme in the string.
next_type2 – [out] an output variable for the lexeme after the next lexeme in the string.
- Returns:
RCL_RET_OK if peeking was successfull, or
- Returns:
RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or
- Returns:
RCL_RET_ERROR if an unspecified error occurs.