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