Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3)

Unified Diff: Parser/listnode.c

Issue 3353: make built-in tokenizer available via Python C API
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Parser/grammar.c ('k') | Parser/parser.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Parser/listnode.c
+++ b/Parser/listnode.c
@@ -30,17 +30,17 @@ list1node(FILE *fp, node *n)
{
if (n == 0)
return;
- if (ISNONTERMINAL(TYPE(n))) {
+ if (PYTOK_ISNONTERMINAL(TYPE(n))) {
int i;
for (i = 0; i < NCH(n); i++)
list1node(fp, CHILD(n, i));
}
- else if (ISTERMINAL(TYPE(n))) {
+ else if (PYTOK_ISTERMINAL(TYPE(n))) {
switch (TYPE(n)) {
- case INDENT:
+ case PYTOK_INDENT:
++level;
break;
- case DEDENT:
+ case PYTOK_DEDENT:
--level;
break;
default:
@@ -50,7 +50,7 @@ list1node(FILE *fp, node *n)
fprintf(fp, "\t");
atbol = 0;
}
- if (TYPE(n) == NEWLINE) {
+ if (TYPE(n) == PYTOK_NEWLINE) {
if (STR(n) != NULL)
fprintf(fp, "%s", STR(n));
fprintf(fp, "\n");
« no previous file with comments | « Parser/grammar.c ('k') | Parser/parser.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+