3
V'íc ã @ s^ d Z ddlmZmZmZmZ ddlmZmZm Z m
Z
mZmZm
Z
mZ dgZG dd deZdS )z¿
pygments.lexers.berry
~~~~~~~~~~~~~~~~~~~~~
Lexer for Berry.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
é )Ú
RegexLexerÚwordsÚincludeÚbygroups)ÚCommentÚ
WhitespaceÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚ
BerryLexerc @ s e Zd ZdZdZddgZdgZddgZdZe d e d
e dde d
e
eje
ejfde d
e
eje
ejfde d
e
eje
ejfe dgde
fdefdefe de de de de de dg de
fdejfdejfgedUd$d%ejfd&ejfd'ejfgedVd$d%efgedWd$d%ejfgdJejfdKejfdLejfgeefge dMejdNfgdOe dPejdNfgdQe j!dNfdRe jdNfgdSZ"dTS )Xr zf
For `berry <http://github.com/berry-lang/berry>`_ source code.
.. versionadded:: 2.12.0
ZBerryZberryÚbez*.beztext/x-berryzapplication/x-berryz\b[^\W\d]\w*Ú
whitespaceÚnumbersÚkeywordsz(def)(\s+)(ú)z\b(class)(\s+)(z\b(import)(\s+)(Úexprz[^\S\n]+z\.\.|[~!%^&*+=|?:<>/-]z
[(){}\[\],.;]ÚcontrolsÚbuiltinsÚfunccallÚmemberÚnameÚstringsz\s+z#-(.|\n)*?-#z#.*?$ÚasÚbreakÚcontinueÚimportÚstaticÚselfÚsuperz\b)Úsuffixz(true|false|nil)\bz(var|def)\bÚifÚelifÚelseÚforÚwhileÚdoÚendÚreturnÚtryÚexceptÚraiseÚassertÚboolÚinputÚ classnameÚclassofÚnumberÚrealÚbytesÚcompileÚmapÚlistÚintÚ
isinstanceÚprintÚrangeÚstrÚmoduleÚsizeÚ
issubclassÚopenÚfileÚtypeÚcallz0[xX][a-fA-F0-9]+z-?\d+z!(-?\d+\.?|\.\d)\d*([eE][+-]?\d+)?z (?=\s*\()z#popz(?<=\.)z\b(?!\()z"([^\\]|\\.)*?"z\'([^\\]|\\.)*?\')Úrootr r r r r r r r r r N)r r r r r r r! )
r# r$ r% r&