aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_lexer.l
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--LuaSL/src/LuaSL_lexer.l15
1 files changed, 2 insertions, 13 deletions
diff --git a/LuaSL/src/LuaSL_lexer.l b/LuaSL/src/LuaSL_lexer.l
index 9c90ed5..3270aff 100644
--- a/LuaSL/src/LuaSL_lexer.l
+++ b/LuaSL/src/LuaSL_lexer.l
@@ -136,21 +136,10 @@ int common(YYSTYPE *lval, char *text, int len, LuaSL_compiler *compiler, boolean
136 if (checkIgnorable) 136 if (checkIgnorable)
137 { 137 {
138 lval->ignorableText = compiler->ignorableText; 138 lval->ignorableText = compiler->ignorableText;
139 compiler->ignorableText = NULL; 139 compiler->ignorableText = eina_strbuf_new();
140 } 140 }
141 else 141 else
142 { 142 eina_strbuf_append_length(compiler->ignorableText, text, len);
143 if (compiler->ignorableText)
144 {
145 int lenI = strlen(compiler->ignorableText);
146 int lenT = strlen(text);
147
148 compiler->ignorableText = realloc(compiler->ignorableText, lenI + lenT + 1);
149 sprintf(&(compiler->ignorableText[lenI]), "%s", text);
150 }
151 else
152 compiler->ignorableText = strdup(text);
153 }
154 143
155 return type; 144 return type;
156} 145}