3
V'íc~ ã @ s> d Z ddlZddlmZmZmZmZmZmZ ddl m
Z
mZmZm
Z
mZmZmZmZmZmZmZ ddlmZmZ dddd d
ddd
dddgZG dd deZG dd deZG dd deZG dd d eZG dd
d
eZG dd deZG dd deZG dd
d
eZ G dd deZ!G dd deZ"G dd deZ#dS )zâ
pygments.lexers.scripting
~~~~~~~~~~~~~~~~~~~~~~~~~
Lexer for scripting and embedded languages.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
é N)Ú
RegexLexerÚincludeÚbygroupsÚdefaultÚcombinedÚwords)ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚErrorÚ
WhitespaceÚOther)Úget_bool_optÚget_list_optÚLuaLexerÚMoonScriptLexerÚChaiscriptLexerÚLSLLexerÚAppleScriptLexerÚ RexxLexerÚMOOCodeLexerÚHybrisLexerÚEasytrieveLexerÚJclLexerÚMiniScriptLexerc @ s¸ e Zd ZdZdZdZdgZddgZddgZd Z d
Z
dZde e
ef Zd
Z
dejfedge ejfe
ejfeefgeddejfdejfdejfdejfdefdedfdefdefdefdejfdejfdejdfdejfd ej fd!ejd"fd#e!fd$eje"d%d&fd'ej#e"d%d(fgedd)efd*e
ef e!j$fe
e!j%d+fd,ed+fgede
e!j&d+fgedded+fe
e!j&fgd-ej'fgd$ejd+fd.ejfgd'ej#d+fd/ej#fgd0 Z(d1d2 Z)d3d4 Z*d5S )6r a
For Lua source code.
Additional options accepted:
`func_name_highlighting`
If given and ``True``, highlight builtin function names
(default: ``True``).
`disabled_modules`
If given, must be a list of module names whose function names
should not be highlighted. By default all modules are highlighted.
To get a list of allowed modules have a look into the
`_lua_builtins` module:
.. sourcecode:: pycon
>>> from pygments.lexers._lua_builtins import MODULES
>>> MODULES.keys()
['string', 'coroutine', 'modules', 'io', 'basic', ...]
ZLuazhttps://www.lua.org/Zluaz*.luaz*.wluaz
text/x-luazapplication/x-luaz-(?:--\[(?P<level>=*)\[[\w\W]*?\](?P=level)\])z (?:--.*$)z(?:\s+)z(?:%s|%s|%s)z(?:[^\W\d]\w*)z#!.*ÚbaseÚwsz'(?i)0x[\da-f]*(\.[\da-f]*)?(p[+-]?\d+)?z#(?i)(\d*\.\d+|\d+\.\d*)(e[+-]?\d+)?z(?i)\d+e[+-]?\d+z\d+z(?s)\[(=*)\[.*?\]\1\]z::Úlabelz\.{3}z[=<>|~&+\-*/%#^]+|\.\.z[\[\]{}().,:;]z(and|or|not)\bzE(break|do|else|elseif|end|for|if|in|repeat|return|then|until|while)\bzgoto\bÚgotoz (local)\bz(true|false|nil)\bz(function)\bÚfuncnamez[A-Za-z_]\w*(\.[A-Za-z_]\w*)?ú'ÚstringescapeÚsqsú"Údqsz[.:]z
%s(?=%s*[.:])z#popz\(zM\\([abfnrtv\\"\']|[\r\n]{1,2}|z\s*|x[0-9a-fA-F]{2}|\d{1,3}|u\{[0-9a-fA-F]+\})z[^\\']+z[^\\"]+) Úrootr! r r$ r# r"