To make my example easier to follow, I chose not to modify code, but you are welcome to dive in and rewrite the entire kernel subsystem if you are so inclined.
为了让我的例子更容易试验,我没有选择修改源代码;不过只要您希望,欢迎继续重写整个内核的子系统。
I began by replacing the example code in my unit test which instantiates the task library's classes with example code for my unimplemented DSL and revised it several times until I was satisfied.
我开始将我单元测试中初始化任务库各个类的范例代码替换成我尚未实现的DSL的范例代码,并且修改了数次,直到我满意为止。
In my example, to keep the model clean, I simply list these properties as having a data type code.
在我的示例中,为保持模型整洁,我仅仅将这些值列举为拥有一个数据类型code。
Unfortunately, the abstraction is leaky: in my ZIP code validator, for example, I would have liked to use regular expressions to perform the check.
不幸的是,抽象是有漏洞的:例如,在我的ZIP代码验证器中,本想使用正则表达式执行检测。
However, I haven't had much luck with my Google-fu in trying to find a good specification of the format, or better yet example code (in any language).
然而,我没有太多的运气与我的谷歌福在试图找到好的规范的格式,或者更好的例子代码(任何语言)。
However, I haven't had much luck with my Google-fu in trying to find a good specification of the format, or better yet example code (in any language).
然而,我没有太多的运气与我的谷歌福在试图找到好的规范的格式,或者更好的例子代码(任何语言)。
应用推荐