MCPcopy Index your code
hub / github.com/GJDuck/e9patch / getTokenName

Function getTokenName

src/e9patch/e9json.cpp:119–148  ·  view source on GitHub ↗

* Get the token name for error reporting. */

Source from the content-addressed store, hash-verified

117 * Get the token name for error reporting.
118 */
119static const char *getTokenName(char token)
120{
121 switch (token)
122 {
123 case ':':
124 return ":";
125 case ',':
126 return ",";
127 case '{':
128 return "{";
129 case '}':
130 return "}";
131 case '[':
132 return "[";
133 case ']':
134 return "]";
135 case EOF:
136 return "<end-of-file>";
137 case TOKEN_BOOL:
138 return "<bool>";
139 case TOKEN_NUMBER:
140 return "<number>";
141 case TOKEN_STRING:
142 return "<string>";
143 case TOKEN_NULL:
144 return "<null>";
145 default:
146 return "???";
147 }
148}
149
150/*
151 * Duplicate a string.

Callers 3

unexpectedTokenFunction · 0.85
expectTokenFunction · 0.85
expectToken2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected