Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Template error system needs line and count information. #50

Closed
4 tasks done
Tracked by #41
hrszpuk opened this issue Jan 20, 2023 · 2 comments · Fixed by #55
Closed
4 tasks done
Tracked by #41

Template error system needs line and count information. #50

hrszpuk opened this issue Jan 20, 2023 · 2 comments · Fixed by #55
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@hrszpuk
Copy link
Owner

hrszpuk commented Jan 20, 2023

Problem

Currently, the template system doesn't do errors very well. It will tell template creators if an error exists but not where.

Solution

This is a simple edit to the lexer and parser. Tokens need to keep hold of the line and column of where they are so the parser can use that information when creating BadStatements.

Checklist

  • Edit lexer to store line and column count
  • Edit token to store line and column count
  • Added line and column count to tokens during lexing
  • Add line and column count to BadStatement struct
@hrszpuk hrszpuk added this to the 2.0.0 milestone Jan 20, 2023
@hrszpuk hrszpuk changed the title Template error system needs line and count information. This is a simple edit to the lexer and parser. Tokens need to keep hold of the line and column of where they are so the parser can use that information when creating BadStatements. Template error system needs line and count information. Jan 20, 2023
@hrszpuk hrszpuk self-assigned this Jan 20, 2023
@hrszpuk hrszpuk added the enhancement New feature or request label Jan 20, 2023
@hrszpuk
Copy link
Owner Author

hrszpuk commented Jan 20, 2023

Will probably implement a tp.Increment() so I can increase index and column at the same time. Also maybe add a newline check in there?

@hrszpuk
Copy link
Owner Author

hrszpuk commented Jan 24, 2023

Done

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant