Skip to content

Commit

Permalink
LSP: Break #line directives a little bit.
Browse files Browse the repository at this point in the history
I think this is okay because line directives are on their way out. The problem that this solves (involving CodeMap generation when a code block has leading blank lines) could have been fixed without breaking #line directives, but this way the number of lines (and special cases!) in our code base decreases.
  • Loading branch information
petervdonovan committed Jan 12, 2022
1 parent 613b9f9 commit c4ca40b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions org.lflang/src/org/lflang/ASTUtils.xtend
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,6 @@ class ASTUtils {

// extract the whitespace prefix
prefix = line.substring(0, firstCharacter)
} else if(!first) {
// Do not remove blank lines. They throw off #line directives.
buffer.append(line)
buffer.append('\n')
}
}
first = false
Expand Down

0 comments on commit c4ca40b

Please sign in to comment.