Sha256: 463851fa993af55fb0296e0d6afa27407ef91bf6917098dd665aba1200d250c7

Contents?: true

Size: 1.22 KB

Versions: 26

Compression:

Stored size: 1.22 KB

Contents

import { Token } from './ast';
import type { Source } from './source';
import { TokenKind } from './tokenKind';
/**
 * Given a Source object, creates a Lexer for that source.
 * A Lexer is a stateful stream generator in that every time
 * it is advanced, it returns the next token in the Source. Assuming the
 * source lexes, the final Token emitted by the lexer will be of kind
 * EOF, after which the lexer will repeatedly return the same EOF token
 * whenever called.
 */
export declare class Lexer {
  source: Source;
  /**
   * The previously focused non-ignored token.
   */
  lastToken: Token;
  /**
   * The currently focused non-ignored token.
   */
  token: Token;
  /**
   * The (1-indexed) line containing the current token.
   */
  line: number;
  /**
   * The character offset at which the current line begins.
   */
  lineStart: number;
  constructor(source: Source);
  get [Symbol.toStringTag](): string;
  /**
   * Advances the token stream to the next non-ignored token.
   */
  advance(): Token;
  /**
   * Looks ahead and returns the next non-ignored token, but does not change
   * the state of Lexer.
   */
  lookahead(): Token;
}
/**
 * @internal
 */
export declare function isPunctuatorTokenKind(kind: TokenKind): boolean;

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
clapton-0.0.26 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.25 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.24 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.23 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.22 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.21 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.20 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.19 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.18 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.17 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.16 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.15 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.14 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.13 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.12 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.11 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.10 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.9 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.8 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts
clapton-0.0.7 lib/clapton/javascripts/node_modules/graphql/language/lexer.d.ts