diff options
author | David Walter Seikel | 2012-01-21 11:15:57 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-21 11:15:57 +1000 |
commit | 3b4d8ee121b00609c5a2817a3ad91c4399ac94f6 (patch) | |
tree | 25760bf757542c3a7b940e81565a772a8a56ce34 /LuaSL | |
parent | Make vectors and rotations parse. (diff) | |
download | SledjHamr-3b4d8ee121b00609c5a2817a3ad91c4399ac94f6.zip SledjHamr-3b4d8ee121b00609c5a2817a3ad91c4399ac94f6.tar.gz SledjHamr-3b4d8ee121b00609c5a2817a3ad91c4399ac94f6.tar.bz2 SledjHamr-3b4d8ee121b00609c5a2817a3ad91c4399ac94f6.tar.xz |
Fix up the comments to match the code, and add more.
Diffstat (limited to 'LuaSL')
-rw-r--r-- | LuaSL/src/LuaSL_LSL_tree.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h index 2bda3b4..c22ceae 100644 --- a/LuaSL/src/LuaSL_LSL_tree.h +++ b/LuaSL/src/LuaSL_LSL_tree.h | |||
@@ -262,24 +262,21 @@ able to try out other data structures at a later date, then benchmark | |||
262 | them with typical scripts. | 262 | them with typical scripts. |
263 | 263 | ||
264 | Right now I see nothing wrong with the current use of hash for script | 264 | Right now I see nothing wrong with the current use of hash for script |
265 | and block variables. The same for script states and functions, as wall | 265 | and block variables. The same for script states and functions, as well |
266 | as state functions. Though in the near future, they will have similar | 266 | as state functions. Though in the near future, they will have similar |
267 | problems to functcions I think - the need to track order and white | 267 | problems to functions I think - the need to track order and white |
268 | space. | 268 | space. |
269 | 269 | ||
270 | Function params though have gotten unwieldy. Each param ends up with | 270 | Function params got unwieldy. Cleaned that up now. |
271 | AST nodes for itself, it's type, it's own paramlist node, and the comma. | ||
272 | The paramlist nodes are the excessive bits, the rest are needed to track | ||
273 | the white space. | ||
274 | 271 | ||
275 | */ | 272 | */ |
276 | 273 | ||
277 | /* General design. | 274 | /* General design. |
278 | 275 | ||
279 | NOTE We should be able to remove the white space tracking at compile | 276 | NOTE We can remove the white space tracking at compile time, as it's |
280 | time, as it's only a debugging aid. Will be a performance and memory | 277 | only a debugging aid. Will be a performance and memory gain for |
281 | gain for productidon use. Tracking values on the other hand will still | 278 | productidon use. Tracking values on the other hand will still be useful |
282 | be useful for constants. | 279 | for constants. |
283 | 280 | ||
284 | The compile process starts with turning tokens into AST nodes connected | 281 | The compile process starts with turning tokens into AST nodes connected |
285 | in a tree. During that process the parser wants to condense nodes down | 282 | in a tree. During that process the parser wants to condense nodes down |
@@ -290,7 +287,9 @@ the process is important at the time. | |||
290 | Once the parser has condensed things down, it only deals with the | 287 | Once the parser has condensed things down, it only deals with the |
291 | condensed nodes. So we can get rid of some of the AST parts at this | 288 | condensed nodes. So we can get rid of some of the AST parts at this |
292 | time, so long as we keep the relevant information. This is what the | 289 | time, so long as we keep the relevant information. This is what the |
293 | other data structures above are for. | 290 | other data structures above are for. Lemon tries to free the no longer |
291 | needed AST nodes itself, even if we are still using them internally. | ||
292 | Need to do something about that. | ||
294 | 293 | ||
295 | */ | 294 | */ |
296 | 295 | ||