SchemaLexer class

Tokenizes a Prisma-style schema.prisma source into a flat Token list.

Rules:

  • Horizontal whitespace (space, tab, carriage return) is skipped.
  • // comments are discarded (not emitted).
  • Newlines (\n) are emitted as TokenKind.newline.
  • @@ is emitted as a single TokenKind.doubleAt token.
  • Non-ASCII characters that are not whitespace are collected into TokenKind.identifier tokens so the parser can emit a proper error.

Constructors

SchemaLexer()
Creates a stateless lexer.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
tokenize(String source) List<Token>
Tokenizes source and returns the resulting token list ending with an TokenKind.eof sentinel.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited