holgerbrandl / r4intellij

An integration of the R programming language into Intellij IDEA
BSD 2-Clause "Simplified" License
148 stars 28 forks source link

Syntax error in function body produces error mark too early #213

Open rillig opened 4 years ago

rillig commented 4 years ago
error.demo <- function(df)
{
  message('hello')
  df$$key <- 'value'
}

image

There is a syntax error in the df$$key line. In the IDE, the syntax error is marked at the {. For long functions, this makes it impossible to spot the actual error. The error marker should be at the point of the actual error, which in this case is the second $.

holgerbrandl commented 4 years ago

I fully agree it's an annoying bug. Unfortunately, my parser skills are to limited to fix this.