Dashboard sipadu mbip
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

SyntaxError.js 460B

1234567891011121314
  1. var createCustomError = require('../utils/createCustomError');
  2. module.exports = function SyntaxError(message, input, offset) {
  3. var error = createCustomError('SyntaxError', message);
  4. error.input = input;
  5. error.offset = offset;
  6. error.rawMessage = message;
  7. error.message = error.rawMessage + '\n' +
  8. ' ' + error.input + '\n' +
  9. '--' + new Array((error.offset || error.input.length) + 1).join('-') + '^';
  10. return error;
  11. };