This commit is contained in:
Valk Richard Li 2020-03-09 01:45:33 +08:00 committed by GitHub
parent 2dc9f0c560
commit d7bda06f17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -104,7 +104,7 @@ void abstract_syntax_tree::print_tree_block(const int n)
{ {
std::string __str=""; std::string __str="";
for(int i=0;i<n;++i) for(int i=0;i<n;++i)
__str+="| "; __str+="| ";
std::cout<<__str; std::cout<<__str;
print_ast_type(node_type); print_ast_type(node_type);
switch(node_type) switch(node_type)
@ -752,4 +752,4 @@ ast:
id: i id: i
return return
num: 0 num: 0
*/ */

View File

@ -433,7 +433,7 @@ class nasal_lexer
++ptr; ++ptr;
} }
} }
std::cout<<">> [Pre-lexer] complete scanning. "<<error<<" error(s)."<<std::endl; std::cout<<">> [Lexer] complete scanning. "<<error<<" error(s)."<<std::endl;
return; return;
} }
void generate_detail_token() void generate_detail_token()
@ -541,7 +541,7 @@ class nasal_lexer
detail_token_list.push_back(detail_token); detail_token_list.push_back(detail_token);
} }
} }
std::cout<<">> [Detail-lexer] complete generating. "<<error<<" error(s)."<<std::endl; std::cout<<">> [Lexer] complete generating. "<<error<<" error(s)."<<std::endl;
return; return;
} }
int get_error() int get_error()