mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 15:25:54 -06:00
Merge pull request #3020 from Microsoft/exposeScanner
Fix #3012: expose scanner
This commit is contained in:
commit
80cff5bf0a
@ -2,12 +2,10 @@
|
||||
/// <reference path="diagnosticInformationMap.generated.ts"/>
|
||||
|
||||
module ts {
|
||||
/* @internal */
|
||||
export interface ErrorCallback {
|
||||
(message: DiagnosticMessage, length: number): void;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export interface Scanner {
|
||||
getStartPos(): number;
|
||||
getToken(): SyntaxKind;
|
||||
@ -600,8 +598,7 @@ module ts {
|
||||
ch > CharacterCodes.maxAsciiCharacter && isUnicodeIdentifierPart(ch, languageVersion);
|
||||
}
|
||||
|
||||
// Creates a scanner over a (possibly unspecified) range of a piece of text.
|
||||
/* @internal */
|
||||
/** Creates a scanner over a (possibly unspecified) range of a piece of text. */
|
||||
export function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner {
|
||||
let pos: number; // Current position (end position of text of current token)
|
||||
let end: number; // end of text
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user