public function lexOne(\Jstewmc\Stream\Stream $stream)
	{
		$token = false;
		
		// if the stream has characters
		if ($stream->hasCharacters()) {
			// switch on the current character
			switch ($stream->current()) {
				
				case '{':
					$token = $this->lexOpenBracket($stream);
					break;
				
				case '}':
					$token = $this->lexCloseBracket($stream);
					break;
				
				case '\\':
					$token = $this->lexBackslash($stream);
					break;
				
				case "\t":
					$token = $this->lexTab($stream);
					break;
				
				case "\n":
				case "\r":
				case "\f":
				case "\0":
					$token = $this->lexOther($stream);
					break;
				
				default:
					$token = $this->lexText($stream);
			}
			// advance the stream to the next character
			$stream->next();
		}

		return $token;
	}
public function lexOne(\Jstewmc\Stream\Stream $stream)
	{
		$token = false;
		
		// if the stream has characters
		if ($stream->hasCharacters()) {
			// switch on the current character
			switch ($stream->current()) {
				
				case '{':
					$token = $this->lexOpenBracket($stream);
					break;
				
				case '}':
					$token = $this->lexCloseBracket($stream);
					break;
				
				case '\\':
					$token = $this->lexBackslash($stream);
					break;
				
				case "\t":
					$token = $this->lexTab($stream);
					break;
				
				case "\n":
				case "\r":
				case "\f":
				case "\0":
					$token = $this->lexOther($stream);
					break;
				
				default:
					$token = $this->lexText($stream);
			}
			// advance the stream to the next character
			$stream->next();
		}

		return $token;
	}
public function lexOne ( \ Jstewmc \ Stream \ Stream $ stream ) { $ token = false ; // if the stream has characters if ( $ stream -> hasCharacters ( ) ) { // switch on the current character switch ( $ stream -> current ( ) ) { case '{' : $ token = $ this -> lexOpenBracket ( $ stream ) ; break ; case '}' : $ token = $ this -> lexCloseBracket ( $ stream ) ; break ; case '\\' : $ token = $ this -> lexBackslash ( $ stream ) ; break ; case "\t" : $ token = $ this -> lexTab ( $ stream ) ; break ; case "\n" : case "\r" : case "\f" : case "\0" : $ token = $ this -> lexOther ( $ stream ) ; break ; default : $ token = $ this -> lexText ( $ stream ) ; } // advance the stream to the next character $ stream -> next ( ) ; } return $ token ; }
Lexes one token from the current stream

I'll leave the stream's pointer on the first character after the token's last
character. For example, if the stream is "\foo bar", I'll leave the stream on
"b" (because the space is part of the control word).

@param  Jstewmc\Stream\Stream  $stream  the character stream
@return  Jstewmc\Rtf\Token\Token|false
@since  0.2.0
Lexes one token from the current stream