Lines Matching refs:source
51 * the same source and input stream share a reference to the same
56 protected $source;
94 ?Pair $source = null,
99 if ($source !== null && !$source->a instanceof TokenSource) {
100 throw new \RuntimeException('Unexpected token source type.');
103 if ($source !== null && !$source->b instanceof CharStream) {
107 $this->source = $source ?? self::emptySource();
113 $tokenSource = $this->source->a;
123 * {@see CommonToken::source()} for tokens that do not have a source.
127 static $source;
129 return $source = $source ?? new Pair(null, null);
137 * the {@see Pair} stored in {@see CommonToken::source()}. Otherwise,
139 * {@see CommonToken::getText()}, and {@see CommonToken::source()} will be
145 $token = new self($this->type, $this->source, $this->channel, $this->start, $this->stop);
263 $source = $this->source->a;
265 if ($source !== null && !$source instanceof TokenSource) {
266 throw new \RuntimeException('Unexpected token source type.');
269 return $source;
274 $stream = $this->source->b;
277 throw new \RuntimeException('Unexpected token source type.');
285 return $this->source;