Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions R/class_index.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@
if (native || isTRUE(magrittr)) {
lhs <- class_xml_first(operator, "preceding-sibling::expr[1]")
placeholder <- vapply(arguments, function(argument) {
leaf <- class_xml_first(argument, if (native) "self::expr[count(*) = 1]/PLACEHOLDER" else
"self::expr[count(*) = 1]/SYMBOL[text() = '.']")
length(leaf) > 0L
isTRUE(xml_find_lgl(argument, if (native) "boolean(PLACEHOLDER[parent::expr[count(*) = 1]])" else
"boolean(SYMBOL[text() = '.' and parent::expr[count(*) = 1]])"))

Check warning on line 51 in R/class_index.R

View workflow job for this annotation

GitHub Actions / lint

file=R/class_index.R,line=51,col=20,[indentation_linter] Indentation should be 24 spaces but is 20 spaces.
}, logical(1L))
if (any(placeholder)) arguments[placeholder] <- list(lhs)
else arguments <- c(list(lhs), arguments)
Expand Down Expand Up @@ -88,7 +87,7 @@
}
for (fun in functions) {
calls <- class_xml_all(xdoc, paste0("//SYMBOL_FUNCTION_CALL[text() = '", fun,
"']/ancestor::expr[.//OP-LEFT-PAREN][1]"))
"']/ancestor::expr[OP-LEFT-PAREN][1]"))
names <- parents <- vector("list", length(calls))
for (i in seq_along(calls)) {
call <- calls[[i]]
Expand Down Expand Up @@ -134,7 +133,7 @@
index <- attr(xdoc, "class_index", exact = TRUE)[[fun]]
if (is.null(index)) {
return(class_xml_all(xdoc, paste0("//SYMBOL_FUNCTION_CALL[text() = '", fun,
"']/ancestor::expr[.//OP-LEFT-PAREN][1]")))
"']/ancestor::expr[OP-LEFT-PAREN][1]")))
}
if (is.null(name)) return(index$calls)
rows <- get0(name, envir = if (parent) index$parents else index$names,
Expand Down
25 changes: 13 additions & 12 deletions R/completion.R
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
data = list(
type = "function",
package = nsname
))

Check warning on line 447 in R/completion.R

View workflow job for this annotation

GitHub Actions / lint

file=R/completion.R,line=447,col=12,[indentation_linter] Indentation should be 16 spaces but is 12 spaces.
})
} else {
completions <- lapply(functs, function(object) {
Expand All @@ -456,7 +456,7 @@
data = list(
type = "function",
package = nsname
))

Check warning on line 459 in R/completion.R

View workflow job for this annotation

GitHub Actions / lint

file=R/completion.R,line=459,col=12,[indentation_linter] Indentation should be 16 spaces but is 12 spaces.
if (!identical(inserted, object)) item$insertText <- inserted
item
})
Expand Down Expand Up @@ -488,7 +488,7 @@
data = list(
type = "function",
package = nsname
))

Check warning on line 491 in R/completion.R

View workflow job for this annotation

GitHub Actions / lint

file=R/completion.R,line=491,col=16,[indentation_linter] Indentation should be 20 spaces but is 16 spaces.
} else {
inserted <- quote_completion_name(object)
item <- list(label = object,
Expand All @@ -498,7 +498,7 @@
data = list(
type = "function",
package = nsname
))

Check warning on line 501 in R/completion.R

View workflow job for this annotation

GitHub Actions / lint

file=R/completion.R,line=501,col=16,[indentation_linter] Indentation should be 20 spaces but is 16 spaces.
if (!identical(inserted, object)) item$insertText <- inserted
}
idx <- idx + 1L
Expand Down Expand Up @@ -573,7 +573,7 @@
value
}
}
candidates[[length(candidates) + 1L]] <<- list(

Check warning on line 576 in R/completion.R

View workflow job for this annotation

GitHub Actions / lint

file=R/completion.R,line=576,col=47,[assignment_linter] Replace <<- by assigning to a specific environment (with assign() or <-) to avoid hard-to-predict behavior.
label = objects,
kind = recycle(kind),
detail = recycle(detail),
Expand Down Expand Up @@ -734,17 +734,17 @@
}

scope_completion_symbols_xpath <- paste(
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)[self::FUNCTION or self::OP-LAMBDA]/following-sibling::SYMBOL_FORMALS",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)/LEFT_ASSIGN[not(following-sibling::expr/*[self::FUNCTION or self::OP-LAMBDA])]/preceding-sibling::expr[count(*)=1]/SYMBOL",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)/RIGHT_ASSIGN[not(preceding-sibling::expr/*[self::FUNCTION or self::OP-LAMBDA])]/following-sibling::expr[count(*)=1]/SYMBOL",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)/EQ_ASSIGN[not(following-sibling::expr/*[self::FUNCTION or self::OP-LAMBDA])]/preceding-sibling::expr[count(*)=1]/SYMBOL",
"(FUNCTION | OP-LAMBDA)/following-sibling::SYMBOL_FORMALS",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)/LEFT_ASSIGN[not(following-sibling::expr[FUNCTION or OP-LAMBDA])]/preceding-sibling::expr[count(*)=1]/SYMBOL",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)/RIGHT_ASSIGN[not(preceding-sibling::expr[FUNCTION or OP-LAMBDA])]/following-sibling::expr[count(*)=1]/SYMBOL",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)/EQ_ASSIGN[not(following-sibling::expr[FUNCTION or OP-LAMBDA])]/preceding-sibling::expr[count(*)=1]/SYMBOL",
"forcond/SYMBOL",
sep = "|")

scope_completion_functs_xpath <- paste(
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)/LEFT_ASSIGN[following-sibling::expr/*[self::FUNCTION or self::OP-LAMBDA]]/preceding-sibling::expr[count(*)=1]/SYMBOL",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)/RIGHT_ASSIGN[preceding-sibling::expr/*[self::FUNCTION or self::OP-LAMBDA]]/following-sibling::expr[count(*)=1]/SYMBOL",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)/EQ_ASSIGN[following-sibling::expr/*[self::FUNCTION or self::OP-LAMBDA]]/preceding-sibling::expr[count(*)=1]/SYMBOL",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)/LEFT_ASSIGN[following-sibling::expr[FUNCTION or OP-LAMBDA]]/preceding-sibling::expr[count(*)=1]/SYMBOL",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)/RIGHT_ASSIGN[preceding-sibling::expr[FUNCTION or OP-LAMBDA]]/following-sibling::expr[count(*)=1]/SYMBOL",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)/EQ_ASSIGN[following-sibling::expr[FUNCTION or OP-LAMBDA]]/preceding-sibling::expr[count(*)=1]/SYMBOL",
sep = "|")

#' Complete bindings supplied by the enclosing execution context
Expand Down Expand Up @@ -1088,9 +1088,8 @@
symbols <- xml_text(xml_find_all(
xdoc,
glue(
"//*[
(self::SYMBOL[preceding-sibling::OP-DOLLAR] or self::SYMBOL_SUB) and
starts-with(text(),'{token_quote}')]",
"//SYMBOL[preceding-sibling::OP-DOLLAR and starts-with(text(),'{token_quote}')] |
//SYMBOL_SUB[starts-with(text(),'{token_quote}')]",
token_quote = token_quote
)
))
Expand All @@ -1099,8 +1098,10 @@
symbols <- c(symbols, xml_text(xml_find_all(
xdoc,
glue(
"//*[(self::SYMBOL or self::SYMBOL_SUB or self::SYMBOL_FORMALS or self::SYMBOL_FUNCTION_CALL) and
starts-with(text(),'{token_quote}')]",
"//SYMBOL[starts-with(text(),'{token_quote}')] |
//SYMBOL_SUB[starts-with(text(),'{token_quote}')] |
//SYMBOL_FORMALS[starts-with(text(),'{token_quote}')] |
//SYMBOL_FUNCTION_CALL[starts-with(text(),'{token_quote}')]",
token_quote = token_quote
)
)))
Expand Down Expand Up @@ -1311,7 +1312,7 @@
nmax <- lsp_settings$get("max_completions")
if (isTRUE(lsp_settings$get("member_completion"))) {
members <- tryCatch(member_completion(uri, workspace, document, point,
snippet_support, nmax), error = function(e) {

Check warning on line 1315 in R/completion.R

View workflow job for this annotation

GitHub Actions / lint

file=R/completion.R,line=1315,col=12,[indentation_linter] Indentation should be 16 spaces but is 12 spaces.
logger$info("static member completion:", e)
NULL
})
Expand Down
8 changes: 3 additions & 5 deletions R/definition.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
definition_xpath <- paste(
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)[self::FUNCTION or self::OP-LAMBDA]/following-sibling::SYMBOL_FORMALS[text() = '{token_quote}' and @line1 <= {row}]",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)[LEFT_ASSIGN[preceding-sibling::expr[count(*)=1]/SYMBOL[text() = '{token_quote}' and @line1 <= {row}] and following-sibling::expr[@start > {start} or @end < {end}]]]",
"(FUNCTION | OP-LAMBDA)/following-sibling::SYMBOL_FORMALS[text() = '{token_quote}' and @line1 <= {row}]",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)[(LEFT_ASSIGN | EQ_ASSIGN)[preceding-sibling::expr[count(*)=1]/SYMBOL[text() = '{token_quote}' and @line1 <= {row}] and following-sibling::expr[@start > {start} or @end < {end}]]]",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)[RIGHT_ASSIGN[following-sibling::expr[count(*)=1]/SYMBOL[text() = '{token_quote}' and @line1 <= {row}] and preceding-sibling::expr[@start > {start} or @end < {end}]]]",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)[EQ_ASSIGN[preceding-sibling::expr[count(*)=1]/SYMBOL[text() = '{token_quote}' and @line1 <= {row}] and following-sibling::expr[@start > {start} or @end < {end}]]]",
"forcond/SYMBOL[text() = '{token_quote}' and @line1 <= {row}]",
sep = "|")

Expand Down Expand Up @@ -73,8 +72,7 @@ definition_reply <- function(id, uri, workspace, document, point,
logger$info("definition: ", token_name, token_text)
if (token_name %in% c("SYMBOL", "SYMBOL_FUNCTION_CALL", "SYMBOL_FORMALS")) {
# symbol
preceding_dollar <- xml_find_first(token, "preceding-sibling::OP-DOLLAR")
if (length(preceding_dollar) == 0) {
if (xml_find_lgl(token, "not(preceding-sibling::OP-DOLLAR)")) {
xpath <- glue(definition_xpath,
row = row, start = token_start, end = token_end,
token_quote = xml_single_quote(token_text))
Expand Down
10 changes: 4 additions & 6 deletions R/folding.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,13 @@ get_document_blocks <- function(xdoc, outline = NULL) {
if (is.null(xdoc)) {
return(NULL)
}
blocks <- xml_find_all(xdoc, "//expr[@line1 < @line2 and
(OP-LEFT-PAREN | OP-LEFT-BRACKET | OP-LEFT-BRACE)/@line1 <
(OP-RIGHT-PAREN | OP-RIGHT-BRACKET | OP-RIGHT-BRACE)/@line1]")
if (!length(blocks)) { # prevent floating point comparision
block_start <- xml_find_all(xdoc, "(//OP-LEFT-PAREN | //OP-LEFT-BRACKET | //OP-LEFT-BRACE)[parent::expr and
@line1 < (following-sibling::OP-RIGHT-PAREN | following-sibling::OP-RIGHT-BRACKET | following-sibling::OP-RIGHT-BRACE)/@line1]")
if (!length(block_start)) { # prevent floating point comparision
return(NULL)
}

block_start <- xml_find_first(blocks, "OP-LEFT-PAREN | OP-LEFT-BRACKET | OP-LEFT-BRACE")
block_end <- xml_find_first(blocks, "OP-RIGHT-PAREN | OP-RIGHT-BRACKET | OP-RIGHT-BRACE")
block_end <- xml_find_first(block_start, "following-sibling::OP-RIGHT-PAREN | following-sibling::OP-RIGHT-BRACKET | following-sibling::OP-RIGHT-BRACE")

block_start_line <- as.integer(xml_attr(block_start, "line1"))
block_end_line <- as.integer(xml_attr(block_end, "line1"))
Expand Down
9 changes: 6 additions & 3 deletions R/highlight.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ DocumentHighlightKind <- list(
Write = 3
)

document_highlight_xpath <- "//*[(self::SYMBOL or self::SYMBOL_FUNCTION_CALL or self::SYMBOL_FORMALS) and not(preceding-sibling::OP-DOLLAR) and text() = '{token_quote}']"
document_highlight_xpath <- paste(
"//SYMBOL[not(preceding-sibling::OP-DOLLAR) and text() = '{token_quote}']",
"//SYMBOL_FUNCTION_CALL[not(preceding-sibling::OP-DOLLAR) and text() = '{token_quote}']",
"//SYMBOL_FORMALS[not(preceding-sibling::OP-DOLLAR) and text() = '{token_quote}']",
sep = " | ")

#' The response to a textDocument/documentHighlight Request
#'
Expand Down Expand Up @@ -87,8 +91,7 @@ document_highlight_reply <- function(id, uri, workspace, document, point) {

tokens <- NULL
if (token_name %in% c("SYMBOL", "SYMBOL_FUNCTION_CALL", "SYMBOL_FORMALS")) {
preceding_dollar <- xml_find_first(token, "preceding-sibling::OP-DOLLAR")
if (length(preceding_dollar) == 0) {
if (xml_find_lgl(token, "not(preceding-sibling::OP-DOLLAR)")) {
xpath <- glue(document_highlight_xpath, token_quote = token_quote)
tokens <- xml_find_all(xdoc, xpath)
}
Expand Down
22 changes: 9 additions & 13 deletions R/hover.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
hover_xpath <- paste(
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)[self::FUNCTION or self::OP-LAMBDA][following-sibling::SYMBOL_FORMALS[text() = '{token_quote}' and @line1 <= {row}]]/parent::expr",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)[LEFT_ASSIGN[preceding-sibling::expr[count(*)=1]/SYMBOL[text() = '{token_quote}' and @line1 <= {row}] and following-sibling::expr[@start > {start} or @end < {end}]]]",
"(FUNCTION | OP-LAMBDA)[following-sibling::SYMBOL_FORMALS[text() = '{token_quote}' and @line1 <= {row}]]/parent::expr",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)[(LEFT_ASSIGN | EQ_ASSIGN)[preceding-sibling::expr[count(*)=1]/SYMBOL[text() = '{token_quote}' and @line1 <= {row}] and following-sibling::expr[@start > {start} or @end < {end}]]]",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)[RIGHT_ASSIGN[following-sibling::expr[count(*)=1]/SYMBOL[text() = '{token_quote}' and @line1 <= {row}] and preceding-sibling::expr[@start > {start} or @end < {end}]]]",
"(* | descendant-or-self::expr | descendant-or-self::expr_or_assign_or_help)[EQ_ASSIGN[preceding-sibling::expr[count(*)=1]/SYMBOL[text() = '{token_quote}' and @line1 <= {row}] and following-sibling::expr[@start > {start} or @end < {end}]]]",
"forcond/SYMBOL[text() = '{token_quote}' and @line1 <= {row}]",
sep = "|")

Expand Down Expand Up @@ -106,16 +105,15 @@ hover_reply <- function(id, uri, workspace, document, point) {
logger$info(token_name, token_text)
if (token_name %in% c("SYMBOL", "SYMBOL_FUNCTION_CALL")) {
# symbol
preceding_dollar <- xml_find_first(token, "preceding-sibling::OP-DOLLAR")
if (length(preceding_dollar) == 0) {
if (xml_find_lgl(token, "not(preceding-sibling::OP-DOLLAR)")) {
xpath <- glue(hover_xpath,
row = row, start = token_start, end = token_end,
token_quote = xml_single_quote(token_text))
all_defs <- xdoc_find_definitions(xdoc, row, col, token_text, xpath)
if (length(all_defs)) {
last_def <- all_defs[[length(all_defs)]]
def_func <- xml_find_first(last_def,
"self::*[LEFT_ASSIGN | RIGHT_ASSIGN | EQ_ASSIGN]/expr[FUNCTION | OP-LAMBDA]")
"expr[(FUNCTION or OP-LAMBDA) and parent::*[LEFT_ASSIGN or RIGHT_ASSIGN or EQ_ASSIGN]]")
if (length(def_func)) {
func_line1 <- as.integer(xml_attr(def_func, "line1"))
def_text <- local_function_signature(document, def_func, token_text)
Expand Down Expand Up @@ -149,12 +147,10 @@ hover_reply <- function(id, uri, workspace, document, point) {
}
} else if (token_name == "SYMBOL_SUB") {
# function parameter
funct <- xml_text(xml_find_first(token,
"preceding-sibling::expr/SYMBOL_FUNCTION_CALL/text()"))
if (!is.na(funct)) {
package <- xml_text(xml_find_first(token,
"preceding-sibling::expr/SYMBOL_PACKAGE/text()"))
if (is.na(package)) {
funct <- xml_find_chr(token, "string(preceding-sibling::expr/SYMBOL_FUNCTION_CALL)")
if (nzchar(funct)) {
package <- xml_find_chr(token, "string(preceding-sibling::expr/SYMBOL_PACKAGE)")
if (!nzchar(package)) {
package <- NULL
xpath <- glue(signature_xpath, row = row,
token_quote = xml_single_quote(funct))
Expand Down Expand Up @@ -191,7 +187,7 @@ hover_reply <- function(id, uri, workspace, document, point) {
}
} else if (token_name == "SYMBOL_FORMALS") {
# function formals
funct <- xml_find_first(token, "preceding-sibling::*[self::FUNCTION or self::OP-LAMBDA]/parent::expr")
funct <- xml_find_first(token, "parent::expr[FUNCTION or OP-LAMBDA]")
func_line1 <- as.integer(xml_attr(funct, "line1"))
doc_line1 <- detect_comments(document$content, func_line1 - 1) + 1

Expand Down
46 changes: 20 additions & 26 deletions R/inlay_hint.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,12 @@ call_has_implicit_argument <- function(call_node) {
operator <- xml_find_first(call_node, "preceding-sibling::*[not(self::COMMENT)][1]")
if (inherits(operator, "xml_missing")) return(FALSE)
if (xml_name(operator) %in% c("PIPE", "OP-PIPE")) {
placeholder <- xml_find_first(call_node, "expr[count(*) = 1]/PLACEHOLDER")
} else if (xml_name(operator) == "SPECIAL" && xml_text(operator) %in% c("%>%", "%<>%", "%T>%")) {
placeholder <- xml_find_first(call_node, "expr[count(*) = 1]/SYMBOL[text() = '.']")
} else {
return(FALSE)
return(xml_find_lgl(call_node, "not(expr[count(*) = 1]/PLACEHOLDER)"))
}
if (xml_name(operator) == "SPECIAL" && xml_text(operator) %in% c("%>%", "%<>%", "%T>%")) {
return(xml_find_lgl(call_node, "not(expr[count(*) = 1]/SYMBOL[text() = '.'])"))
}
inherits(placeholder, "xml_missing")
FALSE
}

#' Match an R named argument using exact and unique partial matching
Expand Down Expand Up @@ -218,17 +217,19 @@ inlay_hint_reply <- function(id, uri, workspace, document, request_range) {
if (request_range$end$character == 0L && end_line > start_line) {
end_line <- end_line - 1L
}
calls <- xml_find_all(
fn_nodes <- xml_find_all(
xdoc,
paste0(
"//expr[@line2 >= ", start_line,
" and @line1 <= ", end_line,
" and expr[1][following-sibling::*[not(self::COMMENT)][1]",
"[self::OP-LEFT-PAREN]] and ",
"expr[1]/SYMBOL_FUNCTION_CALL]"
"//SYMBOL_FUNCTION_CALL[parent::expr[",
"not(preceding-sibling::expr or ./OP-DOLLAR or ./OP-AT)",
" and following-sibling::*[not(self::COMMENT)][1][self::OP-LEFT-PAREN]",
" and parent::expr[@line2 >= ", start_line, " and @line1 <= ", end_line, "]]]"
)
)
if (!length(calls)) return(Response$new(id, result = list()))
if (!length(fn_nodes)) return(Response$new(id, result = list()))
calls <- xml_parent(xml_parent(fn_nodes))
function_names <- xml_text(fn_nodes)
packages <- xml_find_chr(fn_nodes, "string(preceding-sibling::SYMBOL_PACKAGE[1])")

minimum_arguments <- lsp_settings$get("inlay_hints_minimum_arguments")
if (!is.numeric(minimum_arguments) || length(minimum_arguments) != 1L ||
Expand All @@ -246,20 +247,13 @@ inlay_hint_reply <- function(id, uri, workspace, document, request_range) {

formals_cache <- new.env(parent = emptyenv())
hints <- list()
for (call_node in calls) {
callee <- xml_find_first(call_node, "expr[1]")
member_operator <- xml_find_first(
callee,
"./*[self::OP-DOLLAR or self::OP-AT]"
)
if (!inherits(member_operator, "xml_missing")) next

function_node <- xml_find_first(callee, "./SYMBOL_FUNCTION_CALL[1]")
if (inherits(function_node, "xml_missing")) next
for (i in seq_along(calls)) {
call_node <- calls[[i]]
function_name <- function_names[[i]]
if (!nzchar(function_name)) next

function_name <- xml_text(function_node)
package_node <- xml_find_first(callee, "./SYMBOL_PACKAGE[1]")
package <- if (inherits(package_node, "xml_missing")) NULL else xml_text(package_node)
package <- packages[[i]]
if (!nzchar(package)) package <- NULL
cache_key <- paste(if (is.null(package)) "" else package, function_name, sep = "::")
if (exists(cache_key, envir = formals_cache, inherits = FALSE)) {
function_formals <- get(cache_key, envir = formals_cache, inherits = FALSE)
Expand Down
6 changes: 2 additions & 4 deletions R/inline_value.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,10 @@ inline_value_reply <- function(id, uri, workspace, document, request_range) {
if (request_range$end$character == 0L && end_line > start_line) {
end_line <- end_line - 1L
}
line_cond <- paste0("@line1 >= ", start_line, " and @line1 <= ", end_line)
nodes <- xml_find_all(
xdoc,
paste0(
"//*[(self::SYMBOL or self::SYMBOL_FORMALS) and ",
"@line1 >= ", start_line, " and @line1 <= ", end_line, "]"
)
paste0("//SYMBOL[", line_cond, "] | //SYMBOL_FORMALS[", line_cond, "]")
)
if (!length(nodes)) return(Response$new(id, result = list()))

Expand Down
Loading
Loading