fix(compiler-cli): pass real source spans where they are empty (#31805)

Some consumers of functions that take `ParseSourceSpan`s currently pass
empty and incorrect source spans. This fixes those cases.

PR Close #31805
This commit is contained in:
Ayaz Hafiz
2019-07-23 12:32:14 -07:00
committed by Kara Erickson
parent 8be8466a00
commit e893c5a330
5 changed files with 153 additions and 90 deletions

View File

@ -7,7 +7,6 @@
*/
import * as chars from './chars';
import {CompileIdentifierMetadata, identifierModuleUrl, identifierName} from './compile_metadata';
import {error} from './util';
export class ParseLocation {
constructor(
@ -109,9 +108,6 @@ export class ParseSourceSpan {
}
}
export const EMPTY_PARSE_LOCATION = new ParseLocation(new ParseSourceFile('', ''), 0, 0, 0);
export const EMPTY_SOURCE_SPAN = new ParseSourceSpan(EMPTY_PARSE_LOCATION, EMPTY_PARSE_LOCATION);
export enum ParseErrorLevel {
WARNING,
ERROR,