feat(parser): and_or_rule in progress
This commit is contained in:
parent
5faa179b63
commit
82f35cfa08
4 changed files with 57 additions and 2 deletions
|
|
@ -98,6 +98,14 @@ static void set_token_keyword(struct token *tok, char *begin, ssize_t size)
|
|||
{
|
||||
tok->type = TOKEN_ELIF;
|
||||
}
|
||||
else if (strncmp(begin, "&&", size) == 0)
|
||||
{
|
||||
tok->type = TOKEN_AND;
|
||||
}
|
||||
else if (strncmp(begin, "||", size) == 0)
|
||||
{
|
||||
tok->type = TOKEN_OR;
|
||||
}
|
||||
|
||||
// no keywords found.
|
||||
if (tok->type == TOKEN_NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue