OpenBD / openbd-core

The original open source Java powered GPL CFML runtime engine
GNU General Public License v3.0
32 stars 14 forks source link

Using var with local ends up in Expression Error #73

Open constantin-mike opened 6 years ago

constantin-mike commented 6 years ago

Hello,

I am working on a project with some old CF code. It actually is a library used as foundation for a bigger project. The library is code-versioned on svn where I am not supposed to change anything. They have code like this: <cfset var LOCAL.foo = 'bar'>. Horrible, yes i know. Problem is, with ACF11 it's working, no problem at all. With OpenBD (which I absolutely love as dev environment) i get Expression Error. I have searched the net, tried everything (tuned the OpenBD settings a little bit on variables & scopes) without any result. I understand that there's a conflict between the variables and local scopes, but somehow it's working on ACF11.

Please, please, please ... would there be any way to fix this without changing the old code from the library, in such a way to work with OpenBD? Today i've tried installing CF2016 dev + IIS & crap on a Win10 machine ... i was not able to make it work. With OpenBD everything is so simple.

Many thanks in advance. Many thanks for this wonderful tool!

wua22 commented 6 years ago

Hi,

The issue is that OpenBD only supports a single identifier in a var assignment like this. The parser doesn't allow for the "LOCAL." prefix.

If you could modify the CFML, then the workaround would be to change the lines to: `

` Unfortunately it's not a quick fix to the OpenBD code and I don't have the bandwidth at the moment to address it. Sorry I couldn't be more help. Andy
dtsw commented 6 years ago

in the meantime, i might be able to help you with CF2016 dev + IIS. Feel free to contact me.

constantin-mike commented 6 years ago

No problem, thank you for your reply. For the moment i am trying CommandBox, seems pretty cool too. OpenBD is still a very useful piece of software, I will keep an eye on it. I find it cool because it works out-of-the-box, it's integrated, has a lot of features etc!