Fix parsing double character binops
This commit is contained in:
parent
c232fc3d43
commit
8459dea8fb
@ -475,26 +475,32 @@ namespace parsing {
|
||||
}
|
||||
|
||||
else if (token.content == "<" && peeked.content == "<") {
|
||||
inner.next();
|
||||
stream.m_position = inner.m_position;
|
||||
return types::BinOp{ types::BinOp::BitShiftLeft };
|
||||
}
|
||||
else if (token.content == ">" && peeked.content == ">") {
|
||||
inner.next();
|
||||
stream.m_position = inner.m_position;
|
||||
return types::BinOp{ types::BinOp::BitShiftRight };
|
||||
}
|
||||
else if (token.content == "<" && peeked.content == "=") {
|
||||
inner.next();
|
||||
stream.m_position = inner.m_position;
|
||||
return types::BinOp{ types::BinOp::LessThanEquals };
|
||||
}
|
||||
else if (token.content == ">" && peeked.content == "=") {
|
||||
inner.next();
|
||||
stream.m_position = inner.m_position;
|
||||
return types::BinOp{ types::BinOp::GreaterThanEquals };
|
||||
}
|
||||
else if (token.content == "=" && peeked.content == "=") {
|
||||
inner.next();
|
||||
stream.m_position = inner.m_position;
|
||||
return types::BinOp{ types::BinOp::Equals };
|
||||
}
|
||||
else if (token.content == "!" && peeked.content == "=") {
|
||||
inner.next();
|
||||
stream.m_position = inner.m_position;
|
||||
return types::BinOp{ types::BinOp::NotEquals };
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user