eric6/ThirdParty/Pygments/pygments/lexers/r.py

changeset 7547
21b0534faebc
parent 6942
2602857055c5
child 7701
25f42e208e08
equal deleted inserted replaced
7546:bf5f777260a6 7547:21b0534faebc
3 pygments.lexers.r 3 pygments.lexers.r
4 ~~~~~~~~~~~~~~~~~ 4 ~~~~~~~~~~~~~~~~~
5 5
6 Lexers for the R/S languages. 6 Lexers for the R/S languages.
7 7
8 :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. 8 :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
9 :license: BSD, see LICENSE for details. 9 :license: BSD, see LICENSE for details.
10 """ 10 """
11 11
12 import re 12 import re
13 13
78 aliases = ['splus', 's', 'r'] 78 aliases = ['splus', 's', 'r']
79 filenames = ['*.S', '*.R', '.Rhistory', '.Rprofile', '.Renviron'] 79 filenames = ['*.S', '*.R', '.Rhistory', '.Rprofile', '.Renviron']
80 mimetypes = ['text/S-plus', 'text/S', 'text/x-r-source', 'text/x-r', 80 mimetypes = ['text/S-plus', 'text/S', 'text/x-r-source', 'text/x-r',
81 'text/x-R', 'text/x-r-history', 'text/x-r-profile'] 81 'text/x-R', 'text/x-r-history', 'text/x-r-profile']
82 82
83 valid_name = r'(?:`[^`\\]*(?:\\.[^`\\]*)*`)|(?:(?:[a-zA-z]|[_.][^0-9])[\w_.]*)' 83 valid_name = r'`[^`\\]*(?:\\.[^`\\]*)*`|(?:[a-zA-Z]|\.[A-Za-z_.])[\w_.]*|\.'
84 tokens = { 84 tokens = {
85 'comments': [ 85 'comments': [
86 (r'#.*$', Comment.Single), 86 (r'#.*$', Comment.Single),
87 ], 87 ],
88 'valid_name': [ 88 'valid_name': [
159 Pygments Lexer for R documentation (Rd) files 159 Pygments Lexer for R documentation (Rd) files
160 160
161 This is a very minimal implementation, highlighting little more 161 This is a very minimal implementation, highlighting little more
162 than the macros. A description of Rd syntax is found in `Writing R 162 than the macros. A description of Rd syntax is found in `Writing R
163 Extensions <http://cran.r-project.org/doc/manuals/R-exts.html>`_ 163 Extensions <http://cran.r-project.org/doc/manuals/R-exts.html>`_
164 and `Parsing Rd files <developer.r-project.org/parseRd.pdf>`_. 164 and `Parsing Rd files <http://developer.r-project.org/parseRd.pdf>`_.
165 165
166 .. versionadded:: 1.6 166 .. versionadded:: 1.6
167 """ 167 """
168 name = 'Rd' 168 name = 'Rd'
169 aliases = ['rd'] 169 aliases = ['rd']

eric ide

mercurial