Remove some old debugging printf()'s
This commit is contained in:
parent
c5a0fbd93e
commit
3d0bba21e1
3
lexer.c
3
lexer.c
|
@ -252,8 +252,6 @@ Token*
|
|||
newTickToken(Lexer* l)
|
||||
{
|
||||
|
||||
printf("backticks @ %d:%d\n", l->line, l->column);
|
||||
|
||||
if (l->position+3 > l->rawLen) {
|
||||
printf("premature EOF parsing ticks\n");
|
||||
return newToken(l, TT_BACKTICK);
|
||||
|
@ -263,7 +261,6 @@ newTickToken(Lexer* l)
|
|||
int i;
|
||||
for(i = 0; i < 3; i++) {
|
||||
if (l->rawFile[l->position+i] != '`') {
|
||||
printf("next char isn't a backtick @ %d: 0x%02X '%c'\n", l->readPosition+i, l->rawFile[l->position+i], l->rawFile[l->position+i]);
|
||||
return newToken(l, TT_BACKTICK);
|
||||
}
|
||||
}
|
||||
|
|
17
main.c
17
main.c
|
@ -93,21 +93,20 @@ main(int argc, const char** argv)
|
|||
node = node->next;
|
||||
}
|
||||
|
||||
printf("rawLen: %d position: %d readPosition: %d ch: %c line: %d column: %d\n",
|
||||
l->rawLen,
|
||||
l->position,
|
||||
l->readPosition,
|
||||
l->ch,
|
||||
l->line,
|
||||
l->column
|
||||
);
|
||||
//printf("rawLen: %d position: %d readPosition: %d ch: %c line: %d column: %d\n",
|
||||
// l->rawLen,
|
||||
// l->position,
|
||||
// l->readPosition,
|
||||
// l->ch,
|
||||
// l->line,
|
||||
// l->column
|
||||
//);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
writeTokenFile(Token* startToken)
|
||||
{
|
||||
printf("writeTokenFile() start\n");
|
||||
int count;
|
||||
FILE* fp = fopen("tokens.txt", "w");
|
||||
if (fp == NULL)
|
||||
|
|
10
node.c
10
node.c
|
@ -13,14 +13,11 @@ Node* parseCodeBlock(Token** firstToken);
|
|||
Node*
|
||||
ParseNodes(Token* firstToken)
|
||||
{
|
||||
printf("ParseNodes() start\n");
|
||||
Node* firstNode = NULL;
|
||||
|
||||
Token* currentToken = firstToken;
|
||||
Node* prevNode = NULL;
|
||||
|
||||
printf("ParseNodes() loop\n");
|
||||
|
||||
while (1) {
|
||||
Node* currentNode = NULL;
|
||||
|
||||
|
@ -37,7 +34,6 @@ ParseNodes(Token* firstToken)
|
|||
break;
|
||||
|
||||
case TT_EOF:
|
||||
printf("EOF found\n");
|
||||
return firstNode;
|
||||
|
||||
default: // paragraph start?
|
||||
|
@ -116,7 +112,6 @@ parseHeader(Token** startToken)
|
|||
|
||||
|
||||
*startToken = t;
|
||||
printf("header hash count: %d\ntext: '%s'\n", count, stringBuff);
|
||||
|
||||
HeaderNode* retval = malloc(sizeof(HeaderNode));
|
||||
switch(count) {
|
||||
|
@ -173,10 +168,6 @@ parseCodeBlock(Token** startToken)
|
|||
|
||||
t = *startToken;
|
||||
|
||||
printf("codeblock token length: %d\n", tlen);
|
||||
printf("codeblock char length: %d\n", clen);
|
||||
|
||||
printf("malloc(%ld)\n", sizeof(char)*clen+1);
|
||||
char* strbuff = malloc(sizeof(char)*clen+1);
|
||||
strbuff[0] = '\0';
|
||||
int i;
|
||||
|
@ -195,7 +186,6 @@ parseCodeBlock(Token** startToken)
|
|||
// skip past closing triple backtick
|
||||
*startToken = t->next;
|
||||
|
||||
printf("malloc(%ld)\n", sizeof(CodeBlockNode));
|
||||
CodeBlockNode* ret = malloc(sizeof(CodeBlockNode));
|
||||
ret->type = NT_BlockCode;
|
||||
ret->rawText = strbuff;
|
||||
|
|
Loading…
Reference in New Issue