aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL
diff options
context:
space:
mode:
Diffstat (limited to 'LuaSL')
-rw-r--r--LuaSL/src/LuaSL_LSL_tree.h7
-rw-r--r--LuaSL/src/LuaSL_lexer.l2
2 files changed, 9 insertions, 0 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h
index 4b5c067..be3896e 100644
--- a/LuaSL/src/LuaSL_LSL_tree.h
+++ b/LuaSL/src/LuaSL_LSL_tree.h
@@ -3,6 +3,7 @@
3#define __LUASL_TREE_H__ 3#define __LUASL_TREE_H__
4 4
5//#define LUASL_DEBUG 5//#define LUASL_DEBUG
6//#define LUASL_DIFF_CHECK
6 7
7 8
8#include <stddef.h> // So we can have NULL defined. 9#include <stddef.h> // So we can have NULL defined.
@@ -149,7 +150,9 @@ struct _LSL_Leaf
149 LSL_Leaf *left; 150 LSL_Leaf *left;
150 LSL_Leaf *right; 151 LSL_Leaf *right;
151 LSL_Token *token; 152 LSL_Token *token;
153#ifdef LUASL_DIFF_CHECK
152 Eina_Strbuf *ignorableText; 154 Eina_Strbuf *ignorableText;
155#endif
153 int line, column, len; 156 int line, column, len;
154 opType basicType; 157 opType basicType;
155 union 158 union
@@ -174,7 +177,9 @@ struct _LSL_Leaf
174struct _LSL_Parenthesis 177struct _LSL_Parenthesis
175{ 178{
176 LSL_Leaf *contents; 179 LSL_Leaf *contents;
180#ifdef LUASL_DIFF_CHECK
177 Eina_Strbuf *rightIgnorableText; 181 Eina_Strbuf *rightIgnorableText;
182#endif
178 LSL_Type type; 183 LSL_Type type;
179}; 184};
180 185
@@ -300,7 +305,9 @@ typedef struct
300 FILE *file; 305 FILE *file;
301 LSL_Leaf *ast; 306 LSL_Leaf *ast;
302 LSL_Script script; 307 LSL_Script script;
308#ifdef LUASL_DIFF_CHECK
303 Eina_Strbuf *ignorableText; 309 Eina_Strbuf *ignorableText;
310#endif
304 LSL_Leaf *lval; 311 LSL_Leaf *lval;
305 int column, line; 312 int column, line;
306 LSL_Block *currentBlock; 313 LSL_Block *currentBlock;
diff --git a/LuaSL/src/LuaSL_lexer.l b/LuaSL/src/LuaSL_lexer.l
index 3270aff..e3ef214 100644
--- a/LuaSL/src/LuaSL_lexer.l
+++ b/LuaSL/src/LuaSL_lexer.l
@@ -133,6 +133,7 @@ int common(YYSTYPE *lval, char *text, int len, LuaSL_compiler *compiler, boolean
133 compiler->column++; 133 compiler->column++;
134 } 134 }
135 135
136#ifdef LUASL_DIFF_CHECK
136 if (checkIgnorable) 137 if (checkIgnorable)
137 { 138 {
138 lval->ignorableText = compiler->ignorableText; 139 lval->ignorableText = compiler->ignorableText;
@@ -140,6 +141,7 @@ int common(YYSTYPE *lval, char *text, int len, LuaSL_compiler *compiler, boolean
140 } 141 }
141 else 142 else
142 eina_strbuf_append_length(compiler->ignorableText, text, len); 143 eina_strbuf_append_length(compiler->ignorableText, text, len);
144#endif
143 145
144 return type; 146 return type;
145} 147}