4
4
extern "C" {
5
5
#endif
6
6
7
-
8
7
/* Error codes passed around between file input, tokenizer, parser and
9
8
interpreter. This is necessary so we can turn them into Python
10
9
exceptions at a higher level. Note that some errors have a
@@ -13,24 +12,26 @@ extern "C" {
13
12
the parser only returns E_EOF when it hits EOF immediately, and it
14
13
never returns E_OK. */
15
14
16
- #define E_OK 10 /* No error */
17
- #define E_EOF 11 /* End Of File */
18
- #define E_INTR 12 /* Interrupted */
19
- #define E_TOKEN 13 /* Bad token */
20
- #define E_SYNTAX 14 /* Syntax error */
21
- #define E_NOMEM 15 /* Ran out of memory */
22
- #define E_DONE 16 /* Parsing complete */
23
- #define E_ERROR 17 /* Execution error */
24
- #define E_TABSPACE 18 /* Inconsistent mixing of tabs and spaces */
25
- #define E_OVERFLOW 19 /* Node had too many children */
26
- #define E_TOODEEP 20 /* Too many indentation levels */
27
- #define E_DEDENT 21 /* No matching outer block for dedent */
28
- #define E_DECODE 22 /* Error in decoding into Unicode */
29
- #define E_EOFS 23 /* EOF in triple-quoted string */
30
- #define E_EOLS 24 /* EOL in single-quoted string */
31
- #define E_LINECONT 25 /* Unexpected characters after a line continuation */
32
- #define E_BADSINGLE 27 /* Ill-formed single statement input */
33
- #define E_INTERACT_STOP 28 /* Interactive mode stopped tokenization */
15
+ #define E_OK 10 /* No error */
16
+ #define E_EOF 11 /* End Of File */
17
+ #define E_INTR 12 /* Interrupted */
18
+ #define E_TOKEN 13 /* Bad token */
19
+ #define E_SYNTAX 14 /* Syntax error */
20
+ #define E_NOMEM 15 /* Ran out of memory */
21
+ #define E_DONE 16 /* Parsing complete */
22
+ #define E_ERROR 17 /* Execution error */
23
+ #define E_TABSPACE 18 /* Inconsistent mixing of tabs and spaces */
24
+ #define E_OVERFLOW 19 /* Node had too many children */
25
+ #define E_TOODEEP 20 /* Too many indentation levels */
26
+ #define E_DEDENT 21 /* No matching outer block for dedent */
27
+ #define E_DECODE 22 /* Error in decoding into Unicode */
28
+ #define E_EOFS 23 /* EOF in triple-quoted string */
29
+ #define E_EOLS 24 /* EOL in single-quoted string */
30
+ #define E_LINECONT 25 /* Unexpected characters after a line continuation */
31
+ #define E_BADSINGLE 27 /* Ill-formed single statement input */
32
+ #define E_INTERACT_STOP 28 /* Interactive mode stopped tokenization */
33
+ #define E_COLUMNOVERFLOW 29 /* Column offset overflow */
34
+
34
35
35
36
#ifdef __cplusplus
36
37
}
0 commit comments