Skip to content

Commit

Permalink
chore: rename variable to follow coding style (#8385)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann authored Mar 15, 2023
1 parent 6aee49b commit c19d088
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/compiler/utils/get_code_frame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ export default function get_code_frame(
return lines
.slice(frame_start, frame_end)
.map((str, i) => {
const isErrorLine = frame_start + i === line;
const is_error_line = frame_start + i === line;
const line_num = String(i + frame_start + 1).padStart(digits, ' ');

if (isErrorLine) {
if (is_error_line) {
const indicator = ' '.repeat(digits + 2 + tabs_to_spaces(str.slice(0, column)).length) + '^';
return `${line_num}: ${tabs_to_spaces(str)}\n${indicator}`;
}
Expand Down

0 comments on commit c19d088

Please sign in to comment.