Skip to content

Commit

Permalink
Finish the JSON parser
Browse files Browse the repository at this point in the history
Now correctly parses simple JSON at least.
  • Loading branch information
abbec committed Sep 30, 2024
1 parent aaf3d24 commit 85ce9be
Show file tree
Hide file tree
Showing 4 changed files with 313 additions and 131 deletions.
5 changes: 3 additions & 2 deletions src/dged/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,8 +788,9 @@ struct location buffer_end(struct buffer *buffer) {
if (buffer->lazy_row_add) {
return (struct location){.line = nlines, .col = 0};
} else {
return (struct location){.line = nlines - 1,
.col = buffer_line_length(buffer, nlines - 1)};
nlines = nlines == 0 ? 0 : nlines - 1;
return (struct location){.line = nlines,
.col = buffer_line_length(buffer, nlines)};
}
}

Expand Down
Loading

0 comments on commit 85ce9be

Please sign in to comment.