Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'Sbt 1': 'Sbt 1',
'Dotty': 'Dotty',
'Typelevel 2.11': 'Typelevel211',
'Typelevel 2.12': 'Typelevel212',
'Paradise 2.11': 'Paradise211',
'Paradise 2.12': 'Paradise212',
'Paradise Typelevel 2.11': 'ParadiseTypelevel211',
'Paradise Typelevel 2.12': 'ParadiseTypelevel212',
};
export default {
...defaultParserInterface,
id: ID,
displayName: ID,
version: pkg.version,
homepage: pkg.homepage || 'https://github.com/scalameta/scalameta',
locationProps: new Set(['pos']),
loadParser(callback) {
require(['scalameta-parsers'], callback);
},
parse(scalametaParser, code, options) {
const parsed = scalametaParser.parseSource(code, options);
const { error, lineNumber, columnNumber } = parsed;
if (error) {
const e = new SyntaxError(parsed.error);
e.lineNumber = lineNumber + 1;
e.columnNumber = columnNumber + 1;
throw e;
}