Parses the given source to tokens.
:param source: The source where to read the data. Can be a path to
a source file as a string or as ``pathlib.Path`` object, an already
opened file object, or Unicode text containing the date directly.
Source files must be UTF-8 encoded.
:param data_only: When ``False`` (default), returns all tokens. When set
to ``True``, omits separators, comments, continuation markers, and
other non-data tokens.
:param tokenize_variables: When ``True``, possible variables in keyword
arguments and elsewhere are tokenized. See the
:meth:`~robot.parsing.lexer.tokens.Token.tokenize_variables`
method for details.
:param lang: Additional languages to be supported during parsing.
Can be a string matching any of the supported language codes or names,
an initialized :class:`~robot.conf.languages.Language` subsclass,
a list containing such strings or instances, or a
:class:`~robot.conf.languages.Languages` instance.
Returns a generator that yields :class:`~robot.parsing.lexer.tokens.Token`
instances.
Definition at line 49 of file lexer.py.