File: //usr/lib/python3/dist-packages/pygments/lexers/__pycache__/r.cpython-310.pyc
o
���a � @ s� d Z ddlZddlmZmZmZmZ ddlmZm Z m
Z
mZmZm
Z
mZmZmZ 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-2021 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)�
RConsoleLexer�SLexer�RdLexerz.*?
c @ s* e Zd ZdZdZddgZdgZdd� ZdS ) r z@
For R console transcripts or R CMD BATCH output files.
�RConsole�rconsole�routz*.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 )N� �>�+r � � )r �options�line_re�finditer�group�
startswith�append�lenr �Promptr �get_tokens_unprocessed�start�Output)�self�text�slexer�current_code_block�
insertions�match�liner r �3/usr/lib/python3/dist-packages/pygments/lexers/r.pyr"