Parser panic information is now more detailed
This commit is contained in:
@@ -134,7 +134,13 @@ func (this *Parser) next () error {
|
||||
}
|
||||
|
||||
func (this *Parser) bug () string {
|
||||
return fmt.Sprintln("bug detected in the compiler! token:", this.token.Kind)
|
||||
return fmt.Sprintln (
|
||||
"Bug detected in the compiler!\n" +
|
||||
"The parser has taken an unexpected control path.",
|
||||
"This could be due to an un-implemented feature.\n" +
|
||||
"Please submit a report with this info and stack trace to:",
|
||||
"https://git.tebibyte.media/sashakoshka/fspl/issues\n" +
|
||||
"The token being parsed was:", this.token.Kind)
|
||||
}
|
||||
|
||||
func (this *Parser) kind () lexer.TokenKind {
|
||||
|
||||
Reference in New Issue
Block a user