Class Scanner

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(fileName: string, text: ISimpleText, languageVersion: LanguageVersion, window?: Array<number>): Scanner

Parameters

Returns

Scanner

Properties

private _languageVersion: any

private fileName: any

private slidingWindow: any

private text: any

private static triviaWindow: any

Methods

public absoluteIndex(): number

Returns

number

private advanceAndSetTokenKind(kind: any): any

Parameters

  • kind: any

Returns

any

private createIllegalEscapeDiagnostic(start: any, end: any): any

Parameters

  • start: any
  • end: any

Returns

any

private createToken(fullStart: any, leadingTriviaInfo: any, start: any, kind: any, end: any, fullEnd: any, trailingTriviaInfo: any, isVariableWidthKeyword: any): any

Parameters

  • fullStart: any
  • leadingTriviaInfo: any
  • start: any
  • kind: any
  • end: any
  • fullEnd: any
  • trailingTriviaInfo: any
  • isVariableWidthKeyword: any

Returns

any

private currentCharCode(): any

Returns

any

public fetchMoreItems(argument: any, sourceIndex: number, window: Array<number>, destinationIndex: number, spaceAvailable: number): number

Parameters

  • argument: any
  • sourceIndex: number
  • window: Array<number>
  • destinationIndex: number
  • spaceAvailable: number

Returns

number

private getErrorMessageText(text: any): any

Parameters

  • text: any

Returns

any

private isDotPrefixedNumericLiteral(): any

Returns

any

private isHexNumericLiteral(): any

Returns

any

private isIdentifierPart(interpretedChar: any): any

Parameters

  • interpretedChar: any

Returns

any

private isIdentifierStart(interpretedChar: any): any

Parameters

  • interpretedChar: any

Returns

any

private isNewLineCharacter(ch: any): any

Parameters

  • ch: any

Returns

any

private isOctalNumericLiteral(): any

Returns

any

private isUnicodeEscape(character: any): any

Parameters

  • character: any

Returns

any

public static isValidIdentifier(text: ISimpleText, languageVersion: LanguageVersion): boolean

Parameters

Returns

boolean

public languageVersion(): LanguageVersion

Returns

LanguageVersion

private peekCharOrUnicodeEscape(): any

Returns

any

private peekUnicodeOrHexEscape(): any

Returns

any

public scan(diagnostics: Diagnostic[], allowRegularExpression: boolean): ISyntaxToken

Parameters

  • diagnostics: Diagnostic[]
  • allowRegularExpression: boolean

Returns

ISyntaxToken

private scanAmpersandToken(): any

Returns

any

private scanAsteriskToken(): any

Returns

any

private scanBarToken(): any

Returns

any

private scanCaretToken(): any

Returns

any

private scanCharOrUnicodeEscape(errors: any): any

Parameters

  • errors: any

Returns

any

private scanDecimalDigits(): any

Returns

any

private scanDecimalNumericLiteral(): any

Returns

any

private scanDefaultCharacter(character: any, diagnostics: any): any

Parameters

  • character: any
  • diagnostics: any

Returns

any

private scanDotToken(diagnostics: any): any

Parameters

  • diagnostics: any

Returns

any

private scanEqualsToken(): any

Returns

any

private scanExclamationToken(): any

Returns

any

private scanHexNumericLiteral(): any

Returns

any

private scanLessThanToken(): any

Returns

any

private scanLineTerminatorSequenceLength(ch: any): any

Parameters

  • ch: any

Returns

any

private scanLineTerminatorSequenceTrivia(ch: any): any

Parameters

  • ch: any

Returns

any

private scanMinusToken(): any

Returns

any

private scanMultiLineCommentTrivia(underlyingText: any, underlyingTextStart: any): any

Parameters

  • underlyingText: any
  • underlyingTextStart: any

Returns

any

private scanMultiLineCommentTriviaLength(diagnostics: any): any

Parameters

  • diagnostics: any

Returns

any

private scanNumericLiteral(diagnostics: any): any

Parameters

  • diagnostics: any

Returns

any

private scanOctalNumericLiteral(diagnostics: any): any

Parameters

  • diagnostics: any

Returns

any

private scanPercentToken(): any

Returns

any

private scanPlusToken(): any

Returns

any

private scanSingleLineCommentTrivia(underlyingText: any, underlyingTextStart: any): any

Parameters

  • underlyingText: any
  • underlyingTextStart: any

Returns

any

private scanSingleLineCommentTriviaLength(): any

Returns

any

private scanSlashToken(allowRegularExpression: any): any

Parameters

  • allowRegularExpression: any

Returns

any

private scanStringLiteral(diagnostics: any): any

Parameters

  • diagnostics: any

Returns

any

private scanSyntaxToken(diagnostics: any, allowRegularExpression: any): any

Parameters

  • diagnostics: any
  • allowRegularExpression: any

Returns

any

public static scanTrivia(text: ISimpleText, start: number, length: number, isTrailing: boolean): ISyntaxTriviaList

Parameters

  • text: ISimpleText
  • start: number
  • length: number
  • isTrailing: boolean

Returns

ISyntaxTriviaList

private scanTrivia(underlyingText: any, underlyingTextStart: any, isTrailing: any): any

Parameters

  • underlyingText: any
  • underlyingTextStart: any
  • isTrailing: any

Returns

any

private scanTriviaInfo(diagnostics: any, isTrailing: any): any

Parameters

  • diagnostics: any
  • isTrailing: any

Returns

any

private scanUnicodeOrHexEscape(errors: any): any

Parameters

  • errors: any

Returns

any

private scanWhitespaceTrivia(underlyingText: any, underlyingTextStart: any): any

Parameters

  • underlyingText: any
  • underlyingTextStart: any

Returns

any

public setAbsoluteIndex(index: number)

Parameters

  • index: number

private skipEscapeSequence(diagnostics: any): any

Parameters

  • diagnostics: any

Returns

any

private slowScanIdentifierOrKeyword(diagnostics: any): any

Parameters

  • diagnostics: any

Returns

any

public substring(start: number, end: number, intern: boolean): string

Parameters

  • start: number
  • end: number
  • intern: boolean

Returns

string

private tryFastScanIdentifierOrKeyword(firstCharacter: any): any

Parameters

  • firstCharacter: any

Returns

any

private tryScanRegularExpressionToken(): any

Returns

any