do refact and fix some issue

This commit is contained in:
bravomikekilo 2019-11-24 13:14:57 +08:00
parent 1ebfa908d5
commit adac4fc2f2
7 changed files with 72 additions and 60 deletions

View file

@ -127,7 +127,7 @@ pub enum BinOp {
}
impl ast::BinExpr {
fn op_details(&self) -> Option<(SyntaxToken, BinOp)> {
pub fn op_details(&self) -> Option<(SyntaxToken, BinOp)> {
self.syntax().children_with_tokens().filter_map(|it| it.into_token()).find_map(|c| {
let bin_op = match c.kind() {
T![||] => BinOp::BooleanOr,