ethanblake4 / dart_eval

Extensible Dart interpreter for Dart with full interop
https://pub.dev/packages/dart_eval
BSD 3-Clause "New" or "Revised" License
334 stars 40 forks source link

This just fixes some of my issues ;) #165

Closed Noobware1 closed 9 months ago

Noobware1 commented 10 months ago

like #164 also tell me if you have any problems with these changes.

Noobware1 commented 10 months ago

Oh and I am sorry for all the extra white space as I was printing most of the stuff to see how it all works :)

ethanblake4 commented 10 months ago

Thanks, this looks really good!

The only big issue I have is with the x is $Value ? a() : b() pattern you have here and here. This pattern is kind of a trap since adding it will often seem to fix an issue without actually fixing it, and 95% of the time it's not the right way to fix the root cause of the problem. If you want to open issues for the problems you were trying to fix I can help narrow down the underlying problem.

Also, if you wouldn't mind please run dart format . in the root directory to format all of the source code.

Finally, it looks like you started trying to implement support for extensions here, but if they don't work yet please remove this code for now.

Noobware1 commented 10 months ago

I knew the is $Value check was bad. Will open an issue so you help me fix the problem. Also the Wrappers I added are auto generated so, it can help to implement most of the stdlib like that.

Lemme make this a draft I'll do the changes tomorrow.