3 ��X/ � @ sp d Z ddlmZmZmZmZ ddlmZmZm Z m Z mZmZm Z mZ ddgZG dd� de�ZG dd� de�ZdS ) z� pygments.lexers.smalltalk ~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for Smalltalk and related languages. :copyright: Copyright 2006-2017 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 ZdZdZdgZdddgZdgZdee e e e �fed �ed �ed�deee je�fed �defde fgdee je e j�fdee je �fdee je e je �fged �deee e j�fdedfed�gdedfdejdfdejdfde dfdedfged �defdejfdefdejfdejdfgdejd@fed!�gdejdfed!�gd"e fd#efgd$e d%fd&e dfd'e jjdfd(e jdfd)e jdfd*ejdfed+�gd,e dfed �d-e jdfd.e jfd/edfd0e jdfd1e jfd2e jdfd3edfd4efd5e fd6e dfgd7e fd8e fd9ee e je ee e e �fd:ee e je ee �fd;ee je eje ee ee ee ee �fd<ee je ee �fd=ee e e �fd,e fgd>�Zd?S )Ar z� For `Smalltalk <http://www.smalltalk.org/>`_ syntax. Contributed by Stefan Matthias Aust. Rewritten by Nils Winter. .. versionadded:: 0.10 Z Smalltalkz*.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� filenames�aliases� mimetypesr r r r r r �Variable�Functionr r ZChar�Symbolr r ZBuiltinZPseudo�Classr �tokens� r( r( �/usr/lib/python3.6/smalltalk.pyr s� c @ s" e Zd ZdZdZdgZdgZdgZdej fde fdeej ee je�fd efd ee jee j�fdee jee�fdejfed �ed�g dejfdejfde jfdee je�fde jfde jfdefdefdefdefdefed�ed�g de fde fde jfde jfde jfgdefd efgd!�Zd"S )#r zZ For `Newspeak <http://newspeaklanguage.org/>` syntax. .. versionadded:: 1.1 ZNewspeakz*.ns2Znewspeakztext/x-newspeakz\b(Newsqueak2)\bz'[^']*'z\b(class)(\s+)(\w+)(\s*)z>\b(mixin|self|super|private|public|protected|nil|true|false)\bz(\w+\:)(\s*)([a-zA-Z_]\w+)z (\w+)(\s*)(=)z<\w+>�expressionstat� whitespacez(\d+\.\d*|\.\d+|\d+[fF])[fF]?z\d+z:\w+z (\w+)(::)z\w+:z\w+z\(|\)z\[|\]z\{|\}z)(\^|\+|\/|~|\*|<|>|=|@|%|\||&|\?|!|,|-|:)z\.|;r z\$.z#'[^']*'z#\w+:?z&#(\+|\/|~|\*|<|>|=|@|%|\||&|\?|!|,|-)+z\s+z"[^"]*")r r* r r+ N)r r r r r r r! r"