Is there 开发者_开发技巧any JavaScript interpreter written in Scala?
For parsing the actual code, the best thing to start with would probably be parser combinators: http://www.codecommit.com/blog/scala/the-magic-behind-parser-combinators
Beyond that you'd need to then build the actual library along with the runtime code to take the parsed elements and execute them, which I'm afraid are out of my realm of knowledge.
Have you looked at parboiled, a PEG parser in scala.
精彩评论