Cleanups
This commit is contained in:
@@ -68,8 +68,8 @@ public class ScalaTokenizer implements Tokenizer {
|
||||
// cannot catch it as it's a checked exception and Scala sneaky throws
|
||||
TokenizeException tokE = (TokenizeException) e;
|
||||
Position pos = tokE.pos();
|
||||
throw new TokenMgrError(
|
||||
pos.startLine() + 1, pos.startColumn() + 1, document.getFileId(), "Scalameta threw", tokE);
|
||||
throw tokenEntries.makeLexException(
|
||||
pos.startLine() + 1, pos.startColumn() + 1, "Scalameta threw", tokE);
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public final class ScalaParser implements Parser {
|
||||
|
||||
@Override
|
||||
public ASTSource parse(ParserTask task) throws ParseException {
|
||||
Input.VirtualFile virtualFile = new Input.VirtualFile(task.getFileDisplayName(), task.getSourceText());
|
||||
Input.VirtualFile virtualFile = new Input.VirtualFile(task.getFileId().toAbsolutePath(), task.getSourceText());
|
||||
Dialect dialect = ScalaLanguageModule.dialectOf(task.getLanguageVersion());
|
||||
Source src = new ScalametaParser(virtualFile, dialect).parseSource();
|
||||
ASTSource root = (ASTSource) new ScalaTreeBuilder().build(src);
|
||||
|
||||
Reference in New Issue
Block a user