Alejandro Mery
1 year ago
2 changed files with 17 additions and 7 deletions
@ -0,0 +1,16 @@
|
||||
package parser |
||||
|
||||
import ( |
||||
"asciigoat.org/core/lexer" |
||||
) |
||||
|
||||
// NewError creates a lexer.Error using a lexer.Position
|
||||
func NewError(pos lexer.Position, content, hint string, err error) *lexer.Error { |
||||
return &lexer.Error{ |
||||
Line: pos.Line, |
||||
Column: pos.Column, |
||||
Content: content, |
||||
Hint: hint, |
||||
Err: err, |
||||
} |
||||
} |
Loading…
Reference in new issue