Browse Source

building stable branch

pull/1/head
Jason Williams 6 years ago
parent
commit
12146fc8d8
  1. 2
      src/lib/syntax/ast/mod.rs
  2. 18
      src/lib/syntax/ast/op.rs
  3. 4
      src/lib/syntax/mod.rs

2
src/lib/syntax/ast/mod.rs

@ -1,5 +1,5 @@
pub mod constant;
pub mod expr;
// pub mod expr;
pub mod keyword;
pub mod op;
pub mod pos;

18
src/lib/syntax/ast/op.rs

@ -201,11 +201,11 @@ impl Operator for BinOp {
| BinOp::Comp(CompOp::NotEqual)
| BinOp::Comp(CompOp::StrictEqual)
| BinOp::Comp(CompOp::StrictNotEqual) => 9,
BinOp::Bit(BitAnd) => 10,
BinOp::Bit(BitXor) => 11,
BinOp::Bit(BitOr) => 12,
BinOp::Log(LogAnd) => 13,
BinOp::Log(LogOr) => 14,
BinOp::Bit(BitOp::And) => 10,
BinOp::Bit(BitOp::Xor) => 11,
BinOp::Bit(BitOp::Or) => 12,
BinOp::Log(LogOp::And) => 13,
BinOp::Log(LogOp::Or) => 14,
}
}
}
@ -216,10 +216,10 @@ impl Display for BinOp {
f,
"{}",
match *self {
BinOp::Num(op) => op.to_string(),
BinOp::Bit(op) => op.to_string(),
BinOp::Comp(op) => op.to_string(),
BinOp::Log(op) => op.to_string(),
BinOp::Num(ref op) => op.to_string(),
BinOp::Bit(ref op) => op.to_string(),
BinOp::Comp(ref op) => op.to_string(),
BinOp::Log(ref op) => op.to_string(),
}
)
}

4
src/lib/syntax/mod.rs

@ -2,5 +2,5 @@
pub mod ast;
/// Parses a string stream into a sequence of tokens
pub mod lexer;
/// Parses a sequence of tokens into expressions
pub mod parser;
// Parses a sequence of tokens into expressions
// pub mod parser;

Loading…
Cancel
Save