Sifter.Query.Parser.State (Sifter v0.2.0)

View Source

Internal parser state for tracking position during token stream processing.

This module maintains the parser's position within the token stream and provides efficient random access to tokens using a tuple-based representation.

Fields

  • toks - Tuple containing all tokens for O(1) access by index
  • i - Current position index in the token stream
  • len - Total number of tokens in the stream

Used internally by the parser's recursive descent functions.

Summary

Types

t()

Parser state for tracking position in token stream.

Types

t()

@type t() :: %Sifter.Query.Parser.State{
  i: non_neg_integer(),
  len: non_neg_integer(),
  toks: tuple()
}

Parser state for tracking position in token stream.

  • toks: All tokens as a tuple for efficient indexing
  • i: Current token index (0-based)
  • len: Total number of tokens