File: //opt/saltstack/salt/lib/python3.10/site-packages/pygments/lexers/__pycache__/r.cpython-310.pyc
o
;jM � @ s� d Z ddlZddlmZmZmZmZ ddlmZm Z m
Z
mZmZm
Z
mZmZmZmZ g d�Ze�d�ZG dd� de�ZG d d
� d
e�ZG dd� de�ZdS )
z�
pygments.lexers.r
~~~~~~~~~~~~~~~~~
Lexers for the R/S languages.
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
� N)�Lexer�
RegexLexer�include�
do_insertions)
�Text�Comment�Operator�Keyword�Name�String�Number�Punctuation�Generic�
Whitespace)�
RConsoleLexer�SLexer�RdLexerz.*?
c @ s6 e Zd ZdZdZddgZdgZdZdZdZ d d
� Z
dS )r z@
For R console transcripts or R CMD BATCH output files.
ZRConsoleZrconsoleZroutz*.Rout�https://www.r-project.org� z"rconsole/r-console-transcript.Routc c s� � t di | j��}d}g }t�|�D ]E}|�� }|�d�s"|�d�r=|�t|�dtj |d d� fgf� ||dd � 7 }q|rNt
||�|��E d H d}g }|�� tj
|fV q|rgt
||�|��E d H d S d S )Nr �>�+r � � )r �options�line_re�finditer�group�
startswith�append�lenr ZPromptr �get_tokens_unprocessed�startZOutput)�self�textZslexerZcurrent_code_blockZ
insertions�match�liner r �E/opt/saltstack/salt/lib/python3.10/site-packages/pygments/lexers/r.pyr # s. �
�
�
��z$RConsoleLexer.get_tokens_unprocessedN)�__name__�
__module__�__qualname__�__doc__�name�aliases� filenames�url�
version_addedZ_exampler r r r r&