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 constant;
pub mod expr; // pub mod expr;
pub mod keyword; pub mod keyword;
pub mod op; pub mod op;
pub mod pos; 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::NotEqual)
| BinOp::Comp(CompOp::StrictEqual) | BinOp::Comp(CompOp::StrictEqual)
| BinOp::Comp(CompOp::StrictNotEqual) => 9, | BinOp::Comp(CompOp::StrictNotEqual) => 9,
BinOp::Bit(BitAnd) => 10, BinOp::Bit(BitOp::And) => 10,
BinOp::Bit(BitXor) => 11, BinOp::Bit(BitOp::Xor) => 11,
BinOp::Bit(BitOr) => 12, BinOp::Bit(BitOp::Or) => 12,
BinOp::Log(LogAnd) => 13, BinOp::Log(LogOp::And) => 13,
BinOp::Log(LogOr) => 14, BinOp::Log(LogOp::Or) => 14,
} }
} }
} }
@ -216,10 +216,10 @@ impl Display for BinOp {
f, f,
"{}", "{}",
match *self { match *self {
BinOp::Num(op) => op.to_string(), BinOp::Num(ref op) => op.to_string(),
BinOp::Bit(op) => op.to_string(), BinOp::Bit(ref op) => op.to_string(),
BinOp::Comp(op) => op.to_string(), BinOp::Comp(ref op) => op.to_string(),
BinOp::Log(op) => op.to_string(), BinOp::Log(ref op) => op.to_string(),
} }
) )
} }

4
src/lib/syntax/mod.rs

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

Loading…
Cancel
Save