github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/lang/errors.go (about) 1 package lang 2 3 // ParserError is the error object used for the murex parser 4 type ParserError struct { 5 Message string 6 Code int 7 EndByte int // this is sometimes useful to know 8 } 9 10 // murex script parsing error codes: 11 const ( 12 NoParsingErrors = 0 + iota 13 ErrPipingToNothing 14 ErrUnknownParserErrorPipe 15 ErrUnableToParseParametersInRunmode 16 ErrInvalidParametersInRunmode 17 ) 18 19 var errMessages = []string{ 20 "No errors. Block successfully parsed", 21 "Piping out to nothing. Commands should not be terminated by a pipe token (`|`, `->`, `=>`, or ` ?`)", 22 "Unexpected error parsing `|`. Reason unknown. Please file a bug at https://github.com/lmorg/murex/issues", 23 "Unable to parse parameters in `runmode`", 24 "Invalid parameters in `runmode`", 25 }