{"action":"created","issue":{"url":"https://api.github.com/repos/jayfor-lang/jayfor/issues/65","labels_url":"https://api.github.com/repos/jayfor-lang/jayfor/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/jayfor-lang/jayfor/issues/65/comments","events_url":"https://api.github.com/repos/jayfor-lang/jayfor/issues/65/events","html_url":"https://github.com/jayfor-lang/jayfor/issues/65","id":54312975,"number":65,"title":"Lexer token contexts need a ton of work","user":{"login":"freefouran","id":6254332,"avatar_url":"https://avatars.githubusercontent.com/u/6254332?v=3","gravatar_id":"","url":"https://api.github.com/users/freefouran","html_url":"https://github.com/freefouran","followers_url":"https://api.github.com/users/freefouran/followers","following_url":"https://api.github.com/users/freefouran/following{/other_user}","gists_url":"https://api.github.com/users/freefouran/gists{/gist_id}","starred_url":"https://api.github.com/users/freefouran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freefouran/subscriptions","organizations_url":"https://api.github.com/users/freefouran/orgs","repos_url":"https://api.github.com/users/freefouran/repos","events_url":"https://api.github.com/users/freefouran/events{/privacy}","received_events_url":"https://api.github.com/users/freefouran/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jayfor-lang/jayfor/labels/easy","name":"easy","color":"0052cc"},{"url":"https://api.github.com/repos/jayfor-lang/jayfor/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-14T11:42:44Z","updated_at":"2015-01-15T11:29:13Z","closed_at":null,"body":"The current code in the Lexer for the `get_token_context` is really messy, same for line contexts, it's mostly the colours being appended. Also we need to make sure that if it's windows you don't append the colour stuff since it isn't supported."},"comment":{"url":"https://api.github.com/repos/jayfor-lang/jayfor/issues/comments/70072965","html_url":"https://github.com/jayfor-lang/jayfor/issues/65#issuecomment-70072965","issue_url":"https://api.github.com/repos/jayfor-lang/jayfor/issues/65","id":70072965,"user":{"login":"ianhedoesit","id":7721597,"avatar_url":"https://avatars.githubusercontent.com/u/7721597?v=3","gravatar_id":"","url":"https://api.github.com/users/ianhedoesit","html_url":"https://github.com/ianhedoesit","followers_url":"https://api.github.com/users/ianhedoesit/followers","following_url":"https://api.github.com/users/ianhedoesit/following{/other_user}","gists_url":"https://api.github.com/users/ianhedoesit/gists{/gist_id}","starred_url":"https://api.github.com/users/ianhedoesit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianhedoesit/subscriptions","organizations_url":"https://api.github.com/users/ianhedoesit/orgs","repos_url":"https://api.github.com/users/ianhedoesit/repos","events_url":"https://api.github.com/users/ianhedoesit/events{/privacy}","received_events_url":"https://api.github.com/users/ianhedoesit/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T11:29:13Z","updated_at":"2015-01-15T11:29:13Z","body":"The first thing I noticed is that `get_token_context` and `get_line_number_context` are [almost exactly identical](https://www.diffchecker.com/6wbcvuln). In fact, they could be merged into one function, but really `get_line_number_context` can just be removed, since it's never used. \r\n\r\nThe other thing is that `colour_error_token` is never actually used in `get_token_context`.\r\n\r\nOther than that, it seems reasonable. What exactly is your issue with it?"}}