Fixed some new gcc gripes about non-const char* for strings

This commit is contained in:
Jason Turner 2009-06-05 02:48:19 +00:00
parent 995116acb4
commit 995bcdba85
2 changed files with 4 additions and 4 deletions

View File

@ -15,8 +15,8 @@ class TokenType { public: enum Type { File, Whitespace, Identifier, Number, Oper
Function_Def, Scoped_Block, Statement, Equation, Return, Expression, Term, Factor, Add, Subtract, Multiply, Divide, Negate, Comment, //29
Value, Fun_Call }; };
char *tokentype_to_string(int tokentype) {
char *token_types[] = {"File", "Whitespace", "Identifier", "Number", "Operator", "Parens_Open", "Parens_Close", //6
const char *tokentype_to_string(int tokentype) {
const char *token_types[] = {"File", "Whitespace", "Identifier", "Number", "Operator", "Parens_Open", "Parens_Close", //6
"Square_Open", "Square_Close", "Curly_Open", "Curly_Close", "Comma", "Quoted_String", "Single_Quoted_String", "Carriage_Return", "Semicolon", //15
"Function_Def", "Scoped_Block", "Statement", "Equation", "Return", "Expression", "Term", "Factor", "Add", "Subtract", "Multiply", "Divide", "Negate", "Comment", //29
"Value", "Fun_Call" };

View File

@ -18,8 +18,8 @@ class TokenType { public: enum Type { File, Whitespace, Identifier, Number, Oper
Function_Def, Scoped_Block, Statement, Equation, Return, Expression, Term, Factor, Negate, Comment,
Value, Fun_Call, Method_Call, Poetry_Call, Comparison }; };
char *tokentype_to_string(int tokentype) {
char *token_types[] = {"File", "Whitespace", "Identifier", "Number", "Operator", "Parens_Open", "Parens_Close",
const char *tokentype_to_string(int tokentype) {
const char *token_types[] = {"File", "Whitespace", "Identifier", "Number", "Operator", "Parens_Open", "Parens_Close",
"Square_Open", "Square_Close", "Curly_Open", "Curly_Close", "Comma", "Quoted_String", "Single_Quoted_String", "Carriage_Return", "Semicolon",
"Function_Def", "Scoped_Block", "Statement", "Equation", "Return", "Expression", "Term", "Factor", "Negate", "Comment",
"Value", "Fun_Call", "Method_Call", "Poetry_Call", "Comparison" };