3 ��X, � @ sf d Z ddlZddlmZmZmZmZ ddlmZm Z m Z mZmZm Z mZmZ dgZG dd� de�ZdS )z� pygments.lexers.inferno ~~~~~~~~~~~~~~~~~~~~~~~ Lexers for Inferno os and all the related stuff. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � N)� RegexLexer�include�bygroups�default)�Punctuation�Text�Comment�Operator�Keyword�Name�String�Number� LimboLexerc @ s e Zd ZdZdZdgZdgZdgZdee e j�fde fde fd ej fgd edfdejfd efdefgd edfdejfdejfdejfdejfdejfdejfdefdefdefdejfdejfde fg ed�ed�defdedfged�ed �gd!�Zd"d#� Zd$S )%r z� Lexer for `Limbo programming language <http://www.vitanuova.com/inferno/limbo.html>`_ TODO: - maybe implement better var declaration highlighting - some simple syntax error highlighting .. versionadded:: 2.0 ZLimboZlimboz*.bz text/limboz^(\s*)([a-zA-Z_]\w*:(\s*)\n)z\nz\s+z#(\n|(.|\n)*?[^\\]\n)�"z#popzO\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|[0-7]{1,3})z [^\\"\n]+z\\�stringz2'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'z (\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+z(\d+\.\d*|\.\d+|\d+[fF])z16r[0-9a-fA-F]+z8r[0-7]+z((([1-3]\d)|([2-9]))r)?(\d+)z [()\[\],.]z%[~!%^&*+=|?:<>/-]|(->)|(<-)|(=>)|(::)z�(alt|break|case|continue|cyclic|do|else|exitfor|hd|if|implement|import|include|len|load|orpick|return|spawn|tagof|tl|to|while)\bzK(byte|int|big|real|string|array|chan|list|adt|fn|ref|of|module|self|type)\bz(con|iota|nil)\bz[a-zA-Z_]\w*� whitespace� statementsz[{}]�;� statement)r r r r �rootc C s t jd| t j�rdS d S )Nz^implement \w+;gffffff�?)�re�search� MULTILINE)�text� r �/usr/lib/python3.6/inferno.py�analyse_textQ s zLimboLexer.analyse_textN)�__name__� __module__�__qualname__�__doc__�name�aliases� filenamesZ mimetypesr r r ZLabelr �Singler ZEscapeZCharr ZFloatZHexZOctZIntegerr r r ZTypeZConstantr r �tokensr r r r r r sJ )r r Zpygments.lexerr r r r Zpygments.tokenr r r r r r r r �__all__r r r r r �<module> s (