void dScriptCompiler::SyntaxError (const dLittleScriptLexical& scanner, const dUserVariable& errorToken, const dUserVariable& errorTokenMarker) { const char* const data = scanner.GetData(); int start = errorToken.m_scannerIndex; int lineNumber = errorToken.m_scannerLine + 1; while (data[start] && isspace (data[start])) { if (data[start] == '\n') { lineNumber ++; } start ++; } int end = errorTokenMarker.m_scannerIndex; while (data[end] && isspace (data[end])) { end --; } dAssert (end >= start); int length = end - start + 1; dString errorLine (&data[start], length); DisplayError ("%s (%d) : syntax error on line: %s\n", m_fileName, lineNumber, errorLine.GetStr()); }
/// Returns the full eror message QString JsonParser::fullErrorMessage() const { if( !errorLine() ) return errorMessage(); return QObject::tr("%1 @ line %2").arg(errorMessage()).arg(errorLine()); }
inline void syntaxError(RexxErrorCodes errorcode, RexxInstruction *i) { errorLine(errorcode, i); }