Skip to content

Commit

Permalink
updates license info and error where endPos points to an invalid posi…
Browse files Browse the repository at this point in the history
…tion because endPos did not wrap around to the next line if it occurred at the very end
  • Loading branch information
ArquintL committed Mar 17, 2022
1 parent f66bc8e commit 42a2f28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/viper/gobra/Gobra.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import scala.concurrent.{Await, Future, TimeoutException}

object GoVerifier {

val copyright = "(c) Copyright ETH Zurich 2012 - 2021"
val copyright = "(c) Copyright ETH Zurich 2012 - 2022"

val name = "Gobra"

Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/viper/gobra/frontend/ParseTreeTranslator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2172,8 +2172,8 @@ class ParseTreeTranslator(pom: PositionManager, source: Source, specOnly : Boole
implicit class PositionableTerminalNode[T <: TerminalNode](term: T) extends PositionableToken(term.getSymbol)

implicit class PositionableToken[T <: Token](tok: T) extends NamedPositionable {
val startPos : Position = Position(tok.getLine, tok.getCharPositionInLine + 1, source)
val endPos : Position = Position(tok.getLine, tok.getCharPositionInLine + 1 + (tok.getStopIndex - tok.getStartIndex + 1), source)
val startPos: Position = source.offsetToPosition(tok.getStartIndex)
val endPos: Position = source.offsetToPosition(tok.getStopIndex + 1)
val name : String = GobraParser.VOCABULARY.getDisplayName(tok.getType)
val text : String = tok.getText
}
Expand Down

0 comments on commit 42a2f28

Please sign in to comment.