Fix matrix consuming following token

pull/3/head
trivernis 4 years ago
parent 80c7bf0813
commit f4b01307fc

@ -349,10 +349,10 @@ mod tests {
} }
#[allow(dead_code)] #[allow(dead_code)]
//#[test] #[test]
fn it_writes_mathml() { fn it_writes_mathml() {
let str_expression = let str_expression =
"sqrt 1 in NN implies 2^4 + sum_(k = 1)^3 - ((1),(2)) [[2, 3 + 3],[4, 5]]"; "alpha sqrt 1 in NN implies 2^4 + sum_(k = 1)^3 - ((1),(2))[[2, 3 + 3],[4, 5]] + alpha";
let expression = parse(str_expression.to_string()); let expression = parse(str_expression.to_string());
fs::write( fs::write(
"test-files/test.html", "test-files/test.html",
@ -368,7 +368,7 @@ mod tests {
#[bench] #[bench]
fn bench_tokenizer(b: &mut Bencher) { fn bench_tokenizer(b: &mut Bencher) {
let expression = "sum_(iiiiiiiii=1)^n i^3=((n(n+1))/2)^2"; let expression = "sqrt 1 in NN implies 2^4 + sum_(k = 1)^3 - ((1),(2)) [[2, 3 + 3],[4, 5]] (((((((nesting)))))))";
b.iter(|| parse(expression.to_string())); b.iter(|| parse(expression.to_string()));
} }
} }

@ -267,7 +267,6 @@ impl TreeParser {
self.step(); self.step();
self.step(); self.step();
expressions.push(self.parse_expression()); expressions.push(self.parse_expression());
self.step();
if let Token::Grouping(Grouping::LBracket) = self.current_token() { if let Token::Grouping(Grouping::LBracket) = self.current_token() {
self.step(); self.step();

Loading…
Cancel
Save