Lines Matching refs:info

79     def __init__(self, info: Optional[QAPISourceInfo]):
86 self.info = info
100 self, schema: QAPISchema, info: Optional[QAPISourceInfo]
103 fname = info.fname if info else QAPISchemaModule.BUILTIN_MODULE_NAME
108 self._set_module(schema, self.info)
121 info: Optional[QAPISourceInfo],
126 super().__init__(info)
146 f.check_clash(self.info, seen)
161 return not self.info
182 def visit_include(self, name: str, info: Optional[QAPISourceInfo]) -> None:
186 self, name: str, info: Optional[QAPISourceInfo], json_type: str
193 info: Optional[QAPISourceInfo],
204 info: Optional[QAPISourceInfo],
213 info: Optional[QAPISourceInfo],
225 info: Optional[QAPISourceInfo],
236 info: Optional[QAPISourceInfo],
246 info: Optional[QAPISourceInfo],
263 info: Optional[QAPISourceInfo],
318 def __init__(self, sub_module: QAPISchemaModule, info: QAPISourceInfo):
319 super().__init__(info)
324 visitor.visit_include(self._sub_module.name, self.info)
373 self.info,
409 visitor.visit_builtin_type(self.name, self.info, self.json_type())
418 info: Optional[QAPISourceInfo],
425 super().__init__(name, info, doc, ifcond, features)
435 m.check_clash(self.info, seen)
459 self.name, self.info, self.ifcond, self.features,
467 self, name: str, info: Optional[QAPISourceInfo], element_type: str
469 super().__init__(name, info, None)
481 self._element_type_name, self.info,
482 self.info.defn_meta if self.info else None)
486 self._set_module(schema, self.element_type.info)
510 visitor.visit_array_type(self.name, self.info, self.ifcond,
521 info: Optional[QAPISourceInfo],
531 super().__init__(name, info, doc, ifcond, features)
553 raise QAPISemError(self.info,
561 self.base = schema.resolve_type(self._base_name, self.info,
566 self.info,
570 self.base.check_clash(self.info, seen)
573 m.check_clash(self.info, seen)
582 self.branches.check_clash(self.info, seen)
592 info: Optional[QAPISourceInfo],
597 m.check_clash(info, seen)
599 self.branches.check_clash(info, seen)
637 self.name, self.info, self.ifcond, self.features,
640 self.name, self.info, self.ifcond, self.features,
650 info: QAPISourceInfo,
656 super().__init__(name, info, doc, ifcond, features)
673 v.check_clash(self.info, seen)
677 self.info,
679 % (v.describe(self.info), v.type.describe()))
695 self.info,
697 % (v.describe(self.info), types_seen[qt]))
715 self.name, self.info, self.ifcond, self.features,
722 info: QAPISourceInfo,
725 self.info = info
743 info: QAPISourceInfo,
746 super().__init__(info, variants)
762 self.info,
774 self.info,
779 self.info,
784 self.info,
792 v = QAPISchemaVariant(m.name, self.info,
797 raise QAPISemError(self.info, "union has no branches")
805 self.info,
810 self.info,
812 % (v.describe(self.info), v.type.describe()))
817 info: Optional[QAPISourceInfo],
826 v.type.check_clash(info, dict(seen))
831 info: QAPISourceInfo,
834 super().__init__(info, variants)
853 info: Optional[QAPISourceInfo],
857 self.info = info
867 info: Optional[QAPISourceInfo],
873 info,
875 % (self.describe(info), seen[cname].describe(info)))
882 def describe(self, info: Optional[QAPISourceInfo]) -> str:
905 assert info is not None
906 if defined_in != info.defn_name:
917 info: Optional[QAPISourceInfo],
921 super().__init__(name, info, ifcond)
944 info: QAPISourceInfo,
950 super().__init__(name, info, ifcond)
963 self.type = schema.resolve_type(self._type_name, self.info,
967 f.check_clash(self.info, seen)
982 info: QAPISourceInfo,
986 super().__init__(name, info, typ, False, ifcond)
995 info: QAPISourceInfo,
1008 super().__init__(name, info, doc, ifcond, features)
1021 assert self.info is not None
1025 self._arg_type_name, self.info, "command's 'data'")
1028 self.info,
1034 self.info,
1040 self.info,
1044 self._ret_type_name, self.info, "command's 'returns'")
1045 if self.name not in self.info.pragma.command_returns_exceptions:
1051 self.info,
1065 self.name, self.info, self.ifcond, self.features,
1077 info: QAPISourceInfo,
1084 super().__init__(name, info, doc, ifcond, features)
1093 self._arg_type_name, self.info, "event's 'data'")
1096 self.info,
1102 self.info,
1108 self.info,
1121 self.name, self.info, self.ifcond, self.features,
1155 assert defn.info or self._predefining
1161 if other_defn.info:
1162 where = QAPISourceError(other_defn.info, "previous definition")
1164 defn.info,
1167 defn.info, "%s is already defined" % other_defn.describe())
1182 info: Optional[QAPISourceInfo],
1187 assert info and what # built-in types must not fail lookup
1189 what = what(info)
1191 info, "%s uses unknown type '%s'" % (what, name))
1213 QAPISchemaInclude(self._make_module(include), expr.info))
1257 info: Optional[QAPISourceInfo],
1261 return [QAPISchemaFeature(f['name'], info,
1270 info: Optional[QAPISourceInfo],
1272 return QAPISchemaEnumMember(name, info,
1274 self._make_features(features, info))
1277 self, values: List[Dict[str, Any]], info: Optional[QAPISourceInfo]
1280 v.get('features'), info)
1284 self, element_type: str, info: Optional[QAPISourceInfo]
1289 name, info, element_type))
1295 info: QAPISourceInfo,
1312 name, info, None, ifcond, None, None, members, None))
1320 info = expr.info
1321 features = self._make_features(expr.get('features'), info)
1323 name, info, expr.doc, ifcond, features,
1324 self._make_enum_members(data, info), prefix))
1332 info: QAPISourceInfo,
1340 typ = self._make_array_type(typ[0], info)
1341 return QAPISchemaObjectTypeMember(name, info, typ, optional, ifcond,
1342 self._make_features(features, info))
1347 info: QAPISourceInfo,
1351 value.get('features'), info)
1358 info = expr.info
1360 features = self._make_features(expr.get('features'), info)
1362 name, info, expr.doc, ifcond, features, base,
1363 self._make_members(data, info),
1371 info: QAPISourceInfo,
1375 typ = self._make_array_type(typ[0], info)
1376 return QAPISchemaVariant(case, info, typ, ifcond)
1384 info = expr.info
1386 features = self._make_features(expr.get('features'), info)
1389 name, info, ifcond,
1390 'base', self._make_members(base, info))
1394 info)
1398 QAPISchemaObjectType(name, info, expr.doc, ifcond, features,
1401 info, variants, tag_name)))
1408 info = expr.info
1409 features = self._make_features(expr.get('features'), info)
1413 info)
1415 tag_member = QAPISchemaObjectTypeMember('type', info, 'QType', False)
1418 name, info, expr.doc, ifcond, features,
1419 QAPISchemaAlternatives(info, variants, tag_member)))
1432 info = expr.info
1433 features = self._make_features(expr.get('features'), info)
1436 name, info, ifcond,
1437 'arg', self._make_members(data, info))
1440 rets = self._make_array_type(rets[0], info)
1442 QAPISchemaCommand(name, info, expr.doc, ifcond, features, data,
1451 info = expr.info
1452 features = self._make_features(expr.get('features'), info)
1455 name, info, ifcond,
1456 'arg', self._make_members(data, info))
1457 self._def_definition(QAPISchemaEvent(name, info, expr.doc, ifcond,