Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Clojure reader/read string是否将元数据附加到表单_Clojure_Clojurescript - Fatal编程技术网

Clojure reader/read string是否将元数据附加到表单

Clojure reader/read string是否将元数据附加到表单,clojure,clojurescript,Clojure,Clojurescript,我在某个地方读到,cljs.reader/read string将元数据附加到它创建的表单上,就像读取的字符串中的位置一样。 这是真的吗?它在什么地方有记录吗? 谢谢。读取字符串不会将元数据添加到返回的表单中: => (meta (cljs.reader/read-string "(prn 0)")) nil 编译后的函数/defs/vars将具有以下类型的元数据: => (meta #'my-fn) {:ns app.core, :name my-fn, :file "src

我在某个地方读到,
cljs.reader/read string
将元数据附加到它创建的表单上,就像读取的字符串中的位置一样。
这是真的吗?它在什么地方有记录吗?
谢谢。

读取字符串不会将元数据添加到返回的表单中:

=> (meta (cljs.reader/read-string "(prn 0)"))
nil
编译后的函数/defs/vars将具有以下类型的元数据:

=> (meta #'my-fn)
{:ns app.core,
 :name my-fn,
 :file "src/cljs/app/core.cljs",
 :end-column 20,
 :column 1,
 :line 125,
 :end-line 125,
 :arglists ([{:keys [x]}]),
 :doc nil,
 :test nil}

为了记录在案,我将尝试使用InstaParse。看见