File: //opt/alt/python311/lib/python3.11/site-packages/pygments/lexers/__pycache__/r.cpython-311.pyc
�
�;f� � �� � d Z ddlZddlmZmZmZmZ ddlmZm Z m
Z
mZmZm
Z
mZmZmZmZ g d�Z ej d� � Z G d� de� � Z G d � d
e� � Z G d� de� � ZdS )
z�
pygments.lexers.r
~~~~~~~~~~~~~~~~~
Lexers for the R/S languages.
:copyright: Copyright 2006-2024 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 �2 � e Zd ZdZdZddgZdgZdZdZd� Z d S )
r z@
For R console transcripts or R CMD BATCH output files.
�RConsole�rconsole�routz*.Rout�https://www.r-project.org� c # �x K � t di | j ��}d}g }t � |� � D ]�}|� � � }|� d� � s|� d� � rH|� t |� � dt j |d d� fgf� � ||dd � z
}��|r-t ||� |� � � � E d {V �� d}g }|� � � t j
|fV � ��|r+t ||� |� � � � E d {V �� d S d S )Nr �>�+r � � )r �options�line_re�finditer�group�
startswith�append�lenr �Promptr �get_tokens_unprocessed�start�Output)�self�text�slexer�current_code_block�
insertions�match�lines �D/opt/alt/python311/lib/python3.11/site-packages/pygments/lexers/r.pyr'