3
V'íc ã @ sz d Z ddlmZmZmZ ddlmZmZmZm Z m
Z
mZmZm
Z
mZ dgZdZed Zdd Zd d
ZG dd deZdS )
zÞ
pygments.lexers.jsonnet
~~~~~~~~~~~~~~~~~~~~~~~
Lexer for Jsonnet data templating language.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
é )ÚincludeÚ
RegexLexerÚwords) ÚCommentÚKeywordÚNameÚNumberÚOperatorÚPunctuationÚStringÚTextÚ
WhitespaceÚJsonnetLexerz
[^\W\d]\w*z(?=\()c C s dj | tfdtjf| tdfgS )Nz[^{}\\]z\\.z#pop)Úformatr ZEscape)Ú
quote_mark© r ú;/tmp/pip-build-gk9425m9/Pygments/pygments/lexers/jsonnet.pyÚstring_rules s r c C s dj | dtjdfgS )Nz([^{quote}\\]|\\.)*{quote})ÚquoteÚfield_separator)r r ÚVariable)r r r r Úquoted_field_name s
r c @ s e Zd ZdZdZdgZddgZdZdej fde
jfd efged
de
fde
fd
e
dfde
dfde
fde
jfdefdedfdedfdedfdedfedddddd d!d"d#d$d%d&d'd(d)gd*d+efd,efd-ed.fd/e ejd0feejd0feejfd1efged
edd2efd3ed4fed5geejd.feejfd,efd6edOfgd8efd9ed4fed5gd:efd9ed4fed5geejfd;efd<ed4fd2efd,efd8ed=fgd;efd<ed4fd2efd,efed5gd,efded>fded?fded@fdAe dBedCfdDed4fdejdEfd
ejdFfed
g eejdPfeejdGfgeded
d3edGfed5gdHed4fed5gd,efdIedQfed
gd2ed4fdDedKfed5gd:efd2ed4fed5geejdRfd,efgd8efd2ed4fdDedKfed5gdMZdNS )Sr zLexer for Jsonnet source code.ZJsonnetZjsonnetz *.jsonnetz*.libsonnetzhttps://jsonnet.orgz
(//|#).*\nz/\*\*([^/]|/(?!\*))*\*/z/\*([^/]|/(?!\*))*\*/Ú _commentsz@'.*'z@".*"ú'Úsinglestringú"Údoublestringz\|\|\|(.|\n)*\|\|\|z[+-]?[0-9]+(.[0-9])?z[!$~+\-&|^=<>*/%]z\{Úobjectz\[Úarrayzlocal\bÚ
local_namezassert\bÚassertÚelseÚerrorÚfalseÚforÚifÚimportZ importstrÚinÚnullZ
tailstrictZthenÚselfÚsuperÚtruez\b)Úsuffixz\s+zfunction(?=\()Úfunction_paramszstd\.Ú
function_argsz[\.()]ú,z\]ú#popÚrootz(?==)Úlocal_valueú=ú;ú:z\(z\)Úfunction_param_defaultÚobject_local_nameÚ
object_assertÚfield_name_exprz(?=ú)Ú
field_namez\}Údouble_field_nameÚsingle_field_namer z (?=[,\)])z\+?::?:?Úfield_valuez#pop:2Úobject_local_value)r r1 r r r r r2 r r- r. r r; r<