Files
ivy/lang/parse/linefeed.c
T

20 lines
399 B
C
Raw Normal View History

#include "ctx.h"
bool peek_linefeed(struct ivy_parser *parser)
{
struct ivy_token *tok = peek_token(parser);
return (tok && tok->t_type == IVY_TOK_LINEFEED);
}
bool parse_linefeed(struct ivy_parser *parser)
{
struct ivy_token *tok = peek_token(parser);
if (!tok || tok->t_type != IVY_TOK_LINEFEED) {
return false;
}
ivy_lexer_read(parser->p_src);
ivy_token_destroy(tok);
return true;
}