Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualkozec

Posted 04 April 2013 - 07:44 AM

Thanks for both of Your answers.

 

You are right assuming thatm I implemented only as much as my own project needed, but I don't see fixing this as that big problem. Maybe I'm missing something?

 

Here is modified CScriptBuilder, patch and sample code that has said problem fixed (or I rather hope, but I made some tests and it looks good tongue.png)

I moved #if preprocessing and entire inclusion before everything else is done, so, as You suggested, when CScriptBuilder encounters #include directive, it recursively calls AddSectionFromFile (or includeCallback) and rest of file is processed only after entire included section is added and parsed for #defines. This way, defining macros in included file and using it right away is possible.

 

But with this way of including, order of sections is reversed and included sections are added before section that includes them. To be honest, I'm not sure what, if anything does this mean. Does order have any importance?


#1kozec

Posted 04 April 2013 - 07:32 AM

Thanks for both of Your answers.

 

You are right assuming thatm I implemented only as much as my own project needed, but I don't see fixing this as that big problem. Maybe I'm missing something?

 

Here is modified CScriptBuilder, patch and sample code that has said problem fixed (or I rather hope, but I made some tests and it looks good tongue.png)

I moved #if preprocessing and entire inclusion before everything else is done, so, as You suggested when CScriptBuilder encounters #include directive, it recursively calls AddSectionFromFile (or includeCallback) and rest of file is processed only after entire included section is added and parsed for #defines. This way, defining macros in included file and using it right away is possible.

 

But including files this way, order of sections is reversed and included sections are added before section that includes them. To be honest, I'm not sure what, if anything does this mean. Do this order have any importance?


PARTNERS