Skip to content

Commit

Permalink
RakuAST: unbreak error reporting by the RakuAST-precompiler
Browse files Browse the repository at this point in the history
Better to report an invalid line number than complaining just about
line-of not being found.
  • Loading branch information
niner committed Feb 13, 2023
1 parent b74d6ac commit 83a870c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/build/raku-ast-compiler.nqp
Expand Up @@ -111,6 +111,10 @@ grammar RakuASTParser {
nqp::die( "$message near '" ~ nqp::substr(self.orig, self.pos, 20) ~ "' at "
~ $*CURRENT-FILE ~ ":" ~ HLL::Compiler.lineof(self.target, self.pos, :cache))
}

method line-of($whatever) {
-1
}
}

# AST
Expand Down

0 comments on commit 83a870c

Please sign in to comment.