mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
all, any deprecated functions (#35)
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
9ca55bcdf8
commit
d3fd0a3a78
@@ -52,9 +52,10 @@ fn analyze_file(regos: &[String], expected_scopes: &[Scope]) -> Result<()> {
|
||||
let mut parser = Parser::new(source)?;
|
||||
modules.push(parser.parse()?);
|
||||
}
|
||||
let modules_ref: Vec<&Module> = modules.iter().collect();
|
||||
|
||||
let analyzer = Analyzer::new();
|
||||
let schedule = analyzer.analyze(&modules)?;
|
||||
let schedule = analyzer.analyze(&modules_ref)?;
|
||||
for (idx, (_, scope)) in schedule.scopes.iter().enumerate() {
|
||||
if idx > expected_scopes.len() {
|
||||
bail!("extra scope generated.")
|
||||
|
||||
Reference in New Issue
Block a user