bug: find lost issue

上级 78ccfce1
......@@ -206,7 +206,6 @@ impl Grammar {
let mut is_first_line = origin_is_first.clone();
if check_while_conditions {
// todo: add really logic
let while_check_result = self.check_while_conditions(
line_text.clone(),
origin_is_first.clone(),
......@@ -660,6 +659,7 @@ return 0;
}
";
let grammar = to_grammar_with_code("test-cases/first-mate/fixtures/c.json", code);
assert_eq!(28, grammar.rule_id2desc.get(&1).unwrap().patterns_length());
debug_output(&grammar, String::from("program.json"));
}
......
......@@ -4,6 +4,7 @@ use crate::rule::{
AbstractRule, BeginEndRule, BeginWhileRule, CaptureRule, IRuleRegistry, IncludeOnlyRule,
MatchRule,
};
use crate::rule::abstract_rule::RuleEnum;
#[derive(Clone, Debug, Serialize)]
pub struct ICompilePatternsResult {
......@@ -126,6 +127,8 @@ impl RuleFactory {
repository,
String::from(include_s.as_str()),
);
} else {
println!("lost local_included_rule: {:?}", include_s);
}
} else {
// todo: find the cases
......@@ -165,6 +168,12 @@ impl RuleFactory {
|| rule.type_of() == "BeginWhileRule"
{
if rule.has_missing_pattern() && rule.patterns_length() == 0 {
match rule.get_rule_instance() {
RuleEnum::BeginEndRule(r) => {
println!("{:?}", r);
},
_ => {}
}
skip_rule = true;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册