我如何获得@punctuation.delimiter的值?
How do I get the value of @punctuation.delimiter?
我想获取有关树保姆的信息。其中,我想获取@punctuation.delimiter
的值。我怎样才能得到它?
在上面的例子中,":":",""."我想获取字符串 ":",";",",","".
你可以简单地通过比较这个“装饰器”的名称和节点的字符类型来检查:
for _, match, _ in query:iter_matches(parent_node, 0, start_row, end_row) do
for id, node in pairs(match) do
if character_type == 'punctuation.delimiter' then
-- do your stuff
end
end
end
Here's is an example how I tried to "access" those "decorators" in my query files.
我想获取有关树保姆的信息。其中,我想获取@punctuation.delimiter
的值。我怎样才能得到它?
在上面的例子中,":":",""."我想获取字符串 ":",";",",","".
你可以简单地通过比较这个“装饰器”的名称和节点的字符类型来检查:
for _, match, _ in query:iter_matches(parent_node, 0, start_row, end_row) do
for id, node in pairs(match) do
if character_type == 'punctuation.delimiter' then
-- do your stuff
end
end
end
Here's is an example how I tried to "access" those "decorators" in my query files.