1
Fork 0

Lex '|>' as the RECV token.

This commit is contained in:
Michael Sullivan 2011-05-26 18:16:24 -07:00
parent 147b088125
commit 55b40e6894
2 changed files with 14 additions and 6 deletions

View file

@ -674,14 +674,21 @@ fn next_token(&reader rdr) -> token::token {
} }
case ('|') { case ('|') {
if (rdr.next() == '|') { alt (rdr.next()) {
case ('|') {
rdr.bump(); rdr.bump();
rdr.bump(); rdr.bump();
ret token::OROR; ret token::OROR;
} else { }
case ('>') {
rdr.bump();
ret token::RECV;
}
case (_) {
ret binop(rdr, token::OR); ret binop(rdr, token::OR);
} }
} }
}
case ('+') { case ('+') {
ret binop(rdr, token::PLUS); ret binop(rdr, token::PLUS);

View file

@ -49,6 +49,7 @@ tag token {
QUES; QUES;
RARROW; RARROW;
SEND; SEND;
RECV;
LARROW; LARROW;
LPAREN; LPAREN;
RPAREN; RPAREN;