Comments (1)
Thanks for the question; sadly that isn't possible at the moment:
- monkey can call functions implemented in golang
- e.g. All the built-in functions.
- golang cannot call back into monkey.
- You could parse and setup a sub-intepreter, as is done for the
eval
implementation. - But that won't help in this case, because the function-object doesnt' contain a copy of its own body.
- You could parse and setup a sub-intepreter, as is done for the
The evaluator works on AST, and that is private/internal to the evaluator, it might be possible to change the signature of the builtin-functions to add a pointer to the evaluator, but that would require a huge overhaul of the internals. Probably not something I would do.
from monkey.
Related Issues (20)
- Encountered a panic when attempting to retrieve an index value from a string HOT 1
- Encountered an issue when using backtick literals HOT 1
- Implement the range operator
- Crash with array.find
- Literal regular expressions should allow captures
- Implement switch-statements
- Updated embedded "standard-library" for go-implant
- CI process not reporting an error.
- Ability to cancel a running Monkey Script HOT 1
- Feat: add code export and import HOT 2
- Add support for `elif` HOT 2
- Need help in adding Object Methods! HOT 5
- Asked some more stuff in #87 HOT 1
- execute env.mon got : identifier not found: self HOT 1
- iteration.mon : wrong hash key/value HOT 2
- EvalContext discards context on recursion HOT 7
- Regex Built In should avoid MustCompile to avoid potential panic
- Range operator assumes increasing direction
- Add fuzz-testing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monkey.