MCPcopy Create free account
hub / github.com/argotorg/solidity / to_string

Function to_string

liblangutil/Scanner.cpp:68–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66{
67
68std::string to_string(ScannerError _errorCode)
69{
70 switch (_errorCode)
71 {
72 case ScannerError::NoError: return "No error.";
73 case ScannerError::IllegalToken: return "Invalid token.";
74 case ScannerError::IllegalHexString: return "Expected even number of hex-nibbles.";
75 case ScannerError::IllegalHexDigit: return "Hexadecimal digit missing or invalid.";
76 case ScannerError::IllegalCommentTerminator: return "Expected multi-line comment-terminator.";
77 case ScannerError::IllegalEscapeSequence: return "Invalid escape sequence.";
78 case ScannerError::UnicodeCharacterInNonUnicodeString: return "Invalid character in string. If you are trying to use Unicode characters, use a unicode\"...\" string literal.";
79 case ScannerError::IllegalCharacterInString: return "Invalid character in string.";
80 case ScannerError::IllegalStringEndQuote: return "Expected string end-quote.";
81 case ScannerError::IllegalNumberSeparator: return "Invalid use of number separator '_'.";
82 case ScannerError::IllegalExponent: return "Invalid exponent.";
83 case ScannerError::IllegalNumberEnd: return "Identifier-start is not allowed at end of a number.";
84 case ScannerError::OctalNotAllowed: return "Octal numbers not allowed.";
85 case ScannerError::DirectionalOverrideUnderflow: return "Unicode direction override underflow in comment or string literal.";
86 case ScannerError::DirectionalOverrideMismatch: return "Mismatching directional override markers in comment or string literal.";
87 default:
88 solAssert(false, "Unhandled case in to_string(ScannerError)");
89 return "";
90 }
91}
92
93
94std::ostream& operator<<(std::ostream& os, ScannerError _errorCode)

Callers 5

toStringMethod · 0.70
assertDetailsMethod · 0.70
printSourceLocationMethod · 0.70
limitSizeMethod · 0.70
Scanner.cppFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected