Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Traineratwot committed May 17, 2024
1 parent 139f2d2 commit 13f3849
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/core/TokenError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ export class TokenError extends Err {
}
case "UNRECOGNIZED_INSTRUCTION":
const token = this.error.token?.value
if (token === undefined) {
this.message = "You can't use instruction in this place"
} else {
this.message = `You can't use ${this.error.token?.value} instruction in this place`
}
this.message = `Unrecognized instruction ${token}`
if (this.error.expected) {
this.message += `, expected ${this.error.expected.join(", ")}`
}
Expand Down

0 comments on commit 13f3849

Please sign in to comment.