8 [PS_ECODE_UNKNOWN_TOKEN] =
"",
9 [PS_ECODE_UNBALANCED_SLASH_COMMENT] =
"The lexer encountered an unknown "
10 "character or a known character in an invalid position.",
12 [PS_ECODE_INVALID_NUMBER] =
"The lexer encountered a number with an "
13 "invalid digit representation or scientific notation.",
15 [PS_ECODE_EMPTY_CHR_LIT] =
"The lexer encountered an empty character "
16 "literal in the source code. Character literals must contain at least one "
19 [PS_ECODE_UNEXPECTED_TKN] =
"The parser attempted to match a current token "
20 "in the token stream against a set number of possibilities. None of those "
21 "possibilities were encountered.",
23 [PS_ECODE_STOP] =
"The maximum number of errors has been received.",
25 [PS_ECODE_EXPECTED_EXPR] =
"The parser expected an expression in the "
26 "source code but did not find one. This could be due to a syntax error.",
28 [PS_ECODE_INVALID_OP] =
"The parser encountered an invalid operator in the "
29 "source code. This could be due to an operator being used in an incorrect "
32 [PS_ECODE_MISMATCH] =
"The parser encountered mismatched groupings in the "
33 "source code. This could be due to mismatched parentheses, brackets, or "
40 return "The provided error code is invalid. Error codes must be in "
43 STR explanation = explanations[code];
45 return "The provided error code does not currently have an explanation "
Error reporting and displaying utilities.
ps_error_code
The type of error that occured.
STR ps_error_explain(enum ps_error_code code)
Returns an explanation of the error code code.