Skip to content
This repository has been archived by the owner on Oct 25, 2019. It is now read-only.

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

Open
rillig opened this issue Oct 11, 2019 · 1 comment
Open

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

rillig opened this issue Oct 11, 2019 · 1 comment
Labels
bug help wanted Repo maintainer needs community help to fix this problem

Comments

@rillig
Copy link
Contributor

rillig commented Oct 11, 2019

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 holgerbrandl added bug help wanted Repo maintainer needs community help to fix this problem labels Oct 20, 2019
@holgerbrandl
Copy link
Owner

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug help wanted Repo maintainer needs community help to fix this problem
Projects
None yet
Development

No branches or pull requests

2 participants