3
V'íc& ã @ sp d Z ddlmZmZmZmZ ddlmZmZm Z m
Z
mZmZm
Z
mZ ddgZG dd deZG dd deZdS ) zâ
pygments.lexers.smalltalk
~~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for Smalltalk and related languages.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
é )Ú
RegexLexerÚincludeÚbygroupsÚdefault)ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚSmalltalkLexerÚ
NewspeakLexerc @ s e Zd ZdZdZdZdgZdddgZdgZd e e
ee
e
fed
ededd
e e
eje
fedde
fde
fgde eje
ejfde eje
fde eje
eje
fgedde e
e
ejfde
dfedgdedfdejdfdejdfde
dfdedfgeddefdejfdefdejfdejd fgdejdAfed"gdejdfed"gd#e
fd$efgd%e
d&fd'e
dfd(ejjdfd)ejdfd*ejdfd+ejdfed,gd-edfedd.ejdfd/ejfd0e
dfd1ejdfd2ejfd3ejdfd4edfd5efd6e
fd7e
dfgd8efd9efd:e eejeeee
efd;e eejeeefd<e ejeejeeeeeeeeefd=e ejeeefd>e ee
efd-efgd?Zd@S )Br z
For Smalltalk syntax.
Contributed by Stefan Matthias Aust.
Rewritten by Nils Winter.
.. versionadded:: 0.10
Z Smalltalkzhttp://www.smalltalk.org/z*.stZ smalltalkZsqueakÚstztext/x-smalltalkz(<)(\w+:)(.*?)(>)zsqueak fileoutÚwhitespaceszmethod definitionz(\|)([\w\s]*)(\|)Úobjectsz \^|\:=|\_z
[\]({}.;!]z([a-zA-Z]+\w*:)(\s*)(\w+)z^(\b[a-zA-Z]+\w*\b)(\s*)$z'^([-+*/\\~<>=|&!?,@%]+)(\s*)(\w+)(\s*)$z
(:)(\s*)(\w+)z\|z#popz'(''|[^'])*'Úafterobjectz\$.z#\(Úparenthz\)z(\d+r)?-?\d+(\.\d+)?(e-?\d+)?z[-+*/\\~<>=|&#!?,@%\w:]+z#*\(Ú
inner_parenthÚrootÚ_parenth_helperz\s+z"(""|[^"])*"z\[Úblockvariablesz\]z+\b(self|super|true|false|nil|thisContext)\bz\b[A-Z]\w*(?!:)\bz\b[a-z]\w*(?!:)\bz+#("(""|[^"])*"|[-+*/\\~<>=|&!?,@%]+|[\w:]+)Úliteralsz! !$z8\b(ifTrue:|ifFalse:|whileTrue:|whileFalse:|timesRepeat:)z\b(new\b(?!:))z\:=|\_z\b[a-zA-Z]+\w*:z\b[a-zA-Z]+\w*z\w+:?|[-+*/\\~<>=|&!?,@%]+z\.ú;z[\])}]z[\[({]z^"(""|[^"])*"!z^'(''|[^'])*'!z7^(!)(\w+)( commentStamp: )(.*?)( prior: .*?!\n)(.*?)(!)z9^(!)(\w+(?: class)?)( methodsFor: )('(?:''|[^'])*')(.*?!)z^(\w+)( subclass: )(#\w+)(\s+instanceVariableNames: )(.*?)(\s+classVariableNames: )(.*?)(\s+poolDictionaries: )(.*?)(\s+category: )(.*?)(!)z5^(\w+(?: class)?)(\s+instanceVariableNames: )(.*?)(!)z(!\n)(\].*)(! !)$)r zmethod definitionr r r r r r r r zsqueak fileoutN)r r )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚurlÚ filenamesÚaliasesÚ mimetypesr r r r r r