AS3 - 在运行时评估 - D.eval VS hurlant [英] AS3 - evaluating at runtime - D.eval vs hurlant
问题描述
我需要通过在都在运行时评估的字符串。因此,我可以这样写:
I need to pass in a string that gets evaluated at runtime. So I can write this:
var foo = someEvalMethod ( "dataObject.someValue" )
来代替:
if ( argIn == "dataObject.someValue")
var foo = dataObject.someValue
}
有没有人有下列评估库,或AS3更好的意见?感谢:
Does anyone have an opinion on the following evaluate libraries, or better ones for AS3? Thanks:
AS3的eval由hurlant:
AS3 eval by hurlant:
D.eval用RIA 1:
D.eval by RIA 1:
http://www.riaone.com/products/deval/
推荐答案
据我所知 AS3的eval 按hurlant是一个真正的编译器。它分析code,生成字节code和它注入到Flash Player实例中使用(通过loadBytes()我猜的)。
As far as I know AS3 eval by hurlant is a "real" compiler. It parses code, generates bytecode and injects it to the Flash Player instance in use (through loadBytes() I guess).
D.eval 有异曲同工之妙,但它不产生字节code,它解析EX pressions,并通过自己的API动态地执行它们。
D.eval has the same purpose but it does not generate bytecode, it parses expressions and execute them dynamically through its own API.
我看的 D.eval作为一个很好的候选人为您所想要的目的。这不是一个全功能的编译器,但它有足够的API,涵盖许多简单的操作。除此之外,它是一种产品,具有公司背后,这始终是一个很好的保证。
I see D.eval as a good candidate for what you are trying to achieve. It's not a full featured compiler, but it has enough APIs that cover many simple operations. Other than that it is a product that has a company behind, which is always a good guaranty.
干杯!
这篇关于AS3 - 在运行时评估 - D.eval VS hurlant的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!