Problem
Several parser/lexer diagnostic details are misleading. currError reports the peek token instead of current token, double-character tokens initialize EndCol with a line number, and struct init errors mention ].
Tasks
Refs: parser/helpers.go:57, lexer/lexer.go:270, parser/expr_infix.go:124.
Problem
Several parser/lexer diagnostic details are misleading.
currErrorreports the peek token instead of current token, double-character tokens initializeEndColwith a line number, and struct init errors mention].Tasks
currErrorto reportcurrToken.Type.Refs:
parser/helpers.go:57,lexer/lexer.go:270,parser/expr_infix.go:124.