3
V'íc& ã @ s^ d Z ddlmZmZmZ ddlmZmZmZm Z m
Z
mZmZm
Z
mZ dgZG dd deZdS )z½
pygments.lexers.func
~~~~~~~~~~~~~~~~~~~~
Lexers for FunC.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
é )Ú
RegexLexerÚincludeÚwords) ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚ
WhitespaceÚPunctuationÚ FuncLexerc - @ sZ e Zd ZdZdZddgZddgZdZdefd efe d
e de de d
e de de de dde
fgedqd>d?d@efedrdQdQd@e
fedsdQdQd@e
jfgdTe
dUfge dd efdVe
fdWefdXedYfgdZefgd[efgd\ejfd]ejd^fgd_ejfd]ejd`fdaejdYfdbejfgedtdQdkd@e
jfedudQdQd@e
jfgeejfgedn ejfgdoZdpS )vr z
For FunC source code.
ZFunCÚfuncZfcz*.fcz*.funczJ(?!")(`([^`]+)`|((?=_)_|(?=\{)\{|(?=\})\}|(?![_`{}]))([^;,\[\]\(\)\s~.]+))z\nz\s+ÚkeywordsÚstringsÚ
directivesÚnumericÚcommentsÚstorageÚ functionsÚ variablesz[.;(),\[\]~{}]ú<=>ú>=ú<=ú!=ú==ú^>>ú~>>ú>>ú<<ú/%ú^%ú~%ú^/ú~/ú+=ú-=ú*=ú/=ú~/=ú^/=ú%=ú^%=ú<<=ú>>=ú~>>=ú^>>=ú&=ú|=ú^=ú^ú=ú~ú/ú%ú-Ú*ú+ú>ú<ú&ú|ú:ú?z(?<=\s)z(?=\s))ÚprefixÚsuffixÚifÚifnotÚelseÚelseifÚ elseifnotÚwhileÚdoÚuntilÚrepeatÚreturnÚimpureÚ method_idÚforallÚasmÚinlineÚ
inline_refz\bÚtrueÚfalsez#include|#pragmaÚ directivezversion|not-versionz-(>=|<=|=|>|<|\^)?([0-9]+)(.[0-9]+)?(.[0-9]+)?ú;z#popz\"([^\n\"]+)\"[Hhcusa]?z?\b(-?(?!_)([\d_]+|0x[\d_a-fA-F]+)|0b[1_0]+)(?<!_)(?=[\s\)\],;])z
;;([^\n]*)z\{-Úcommentz[^-}{]+z#pushz-\}z[-}{]ÚvarÚintÚsliceÚtupleÚcellÚbuilderÚcontÚ_z(?=[\s\(\),\[\]])ÚglobalÚconstz(?=[\(]))Úrootr r rW r r r rY r r r N)+r r r r r r r r r r! r"