nixd
|
#include <Diagnostic.h>
Public Types | |
enum | Severity { DS_Fatal , DS_Error , DS_Warning , DS_Info , DS_Hint } |
Public Member Functions | |
Diagnostic (DiagnosticKind Kind, LexerCursorRange Range) | |
Internal kind. | |
DiagnosticKind | kind () const |
const char * | message () const override |
virtual const char * | sname () const |
Note & | note (Note::NoteKind Kind, LexerCursorRange Range) |
const std::vector< Note > & | notes () const |
Fix & | fix (std::string Message) |
const std::vector< Fix > & | fixes () const |
Public Member Functions inherited from nixf::PartialDiagnostic | |
virtual | ~PartialDiagnostic ()=default |
PartialDiagnostic & | operator<< (std::string Var) |
std::string | format () const |
const std::vector< std::string > & | args () const |
std::vector< std::string > & | args () |
void | tag (DiagnosticTag Tag) |
const std::vector< DiagnosticTag > & | tags () const |
LexerCursorRange | range () const |
Static Public Member Functions | |
static Severity | severity (DiagnosticKind Kind) |
static const char * | message (DiagnosticKind Kind) |
static const char * | sname (DiagnosticKind Kind) |
static std::optional< Diagnostic::DiagnosticKind > | parseKind (std::string_view SName) |
Parse diagnostic "cname" to diagnostic id. | |
Additional Inherited Members | |
Protected Member Functions inherited from nixf::PartialDiagnostic | |
PartialDiagnostic ()=default | |
PartialDiagnostic (LexerCursorRange Range) | |
The super class for all diagnostics. concret diagnostic types are defined in Diagnostic*.inc
Definition at line 147 of file Diagnostic.h.
Each diagnostic contains a severity field, should be "Fatal", "Error" or "Warning" this will affect the eval process.
"Warning" – just a warning.
Definition at line 154 of file Diagnostic.h.
|
inline |
Internal kind.
Definition at line 173 of file Diagnostic.h.
|
inline |
Definition at line 203 of file Diagnostic.h.
Referenced by nixf::Sema::checkFormalEllipsis(), nixf::Sema::checkFormalEmpty(), nixf::Sema::checkFormalSep(), nixf::detail::diagNullExpr(), nixf::Sema::lowerInheritName(), nixf::Parser::parseAttrPath(), nixf::Parser::parseBinding(), nixf::Parser::parseExprAssert(), nixf::Parser::parseExprIf(), nixf::Parser::parseExprParen(), nixf::Parser::parseExprSelect(), nixf::Parser::parseExprSimple(), nixf::Parser::parseInherit(), and nixf::Parser::parseLambdaArg().
|
inlinenodiscard |
Definition at line 207 of file Diagnostic.h.
|
inlinenodiscard |
Definition at line 176 of file Diagnostic.h.
|
inlinenodiscardoverridevirtual |
Implements nixf::PartialDiagnostic.
Definition at line 182 of file Diagnostic.h.
References kind(), and message().
Referenced by message().
|
staticnodiscard |
|
inline |
Definition at line 197 of file Diagnostic.h.
Referenced by nixf::Sema::dedupFormal(), nixf::Sema::onLambdaArg(), nixf::Parser::parseExprAssert(), nixf::Parser::parseExprIf(), nixf::Parser::parseExprWith(), nixf::Parser::parseFormals(), nixf::Parser::parseInherit(), and nixf::Parser::parseLambdaArg().
|
inlinenodiscard |
Definition at line 201 of file Diagnostic.h.
|
staticnodiscard |
Parse diagnostic "cname" to diagnostic id.
|
staticnodiscard |
Referenced by nixd::getLSPSeverity().
|
inlinenodiscardvirtual |
|
staticnodiscard |
Short name, switch name. There might be a human readable short name that controls the diagnostic For example, one may pass -Wno-dup-formal to suppress duplicated formals. A special case for parsing errors, generated from bison have the sname "bison"