aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/rc/lex.c
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-10-21 13:28:25 -0700
committerNicholas Noll <nbnoll@eml.cc>2021-10-21 13:28:25 -0700
commitda77d3be2eb0785bc0c0b60c686e163d6243c744 (patch)
tree75f15d89c1517bf0ba82128753fd0f6c4d3d2447 /sys/cmd/rc/lex.c
parent65193a54609c558e473118dba323edc001bdb585 (diff)
feat(rc): added andand and oror operators
Diffstat (limited to 'sys/cmd/rc/lex.c')
-rw-r--r--sys/cmd/rc/lex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/cmd/rc/lex.c b/sys/cmd/rc/lex.c
index 5de238e..6065981 100644
--- a/sys/cmd/rc/lex.c
+++ b/sys/cmd/rc/lex.c
@@ -242,6 +242,10 @@ yylex(void)
case '&':
lexer.haddollar = 0;
+ if(nextis('&')){
+ put2('&','&');
+ return Tandand;
+ }
put1('&');
return '&';