public override IPModuleExpr VisitAssertModuleExpr([NotNull] PParser.AssertModuleExprContext context) { var monList = new List <Machine>(); foreach (var monName in context.idenList()._names) { if (!globalScope.Get(monName.GetText(), out Machine monitor)) { throw handler.MissingDeclaration(monName, "spec machine", monName.GetText()); } if (!monitor.IsSpec) { throw handler.ExpectedMonitor(monName, monitor); } monList.Add(monitor); } return(new AssertModuleExpr(context, monList, Visit(context.modExpr()))); }