def report(self, msg: str, context: Context, severity: str, file: str = None, origin: Context = None) -> None: """Report an error or note (unless disabled).""" if self.disable_count <= 0: self.errors.report(context.get_line() if context else -1, context.get_column() if context else -1, msg.strip(), severity=severity, file=file, origin_line=origin.get_line() if origin else None)
def fail(self, msg: str, context: Context, *, code: Optional[ErrorCode] = None) -> None: self.errors.report(context.get_line(), context.get_column(), msg, code=code)
def fail(self, msg: str, context: Context) -> None: self.errors.report(context.get_line(), context.get_column(), msg)
def fail(self, msg: str, ctx: Context, *, blocker: bool = False) -> None: self.errors.report(ctx.get_line(), ctx.get_column(), msg)