3 ��X � @ sf d Z ddlmZmZmZmZmZ ddlmZm Z m Z mZmZm Z mZmZmZ dgZG dd� de�ZdS )z� pygments.lexers.rust ~~~~~~~~~~~~~~~~~~~~ Lexers for the Rust language. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � )� RegexLexer�include�bygroups�words�default) �Text�Comment�Operator�Keyword�Name�String�Number�Punctuation� Whitespace� RustLexerc 0 @ s> e Zd ZdZdZddgZdgZdgZed�dd�e j fZed�dd�ej fZd:ejfed;�gd<efd=efd>ejfd?ejfd@ejfdAejdBfdCejdBfdDejdEfdFejfed�dd�e fed�dd�e jfdoe jfdpe dqfdre jfdse dtfdue dvfdwee ee �fedxej jfedyefdzedvfd{ee ejej�fd|ejfd}ejfd~ej dfd�ej!dfd�ej"dfd�ej#dfd�ej$dfd�ed�fd�ed�fd�efd�ej fd�ej%fd�e&fd�e'fd�efd�ejd�fd�eeje&eeee&�d�fd�eeje&eee&�d�fg)d�ejfdDejd�fd�ejd�fd�ejfgd�ejfdDejd�fd�ejd�fd�ejfgd=efd�ej(d�fed��gd=efd�ej)d�fed��gd=efd�e jfeed�ej*d�fed��gd�e d�fd�e d�fed��gd�ed�fd�ej+fd�efd�efgd�ej+fe,d��gd�e'd�fd�e'd�fgd�e'd�fd�e'd�fgd�ed�fd�ejd�fd�ejd�fge,d��d�ejd�fd�ejfge,d��d�ejd�fd�ejfgd��Z-d�S )�r z\ Lexer for the Rust programming language (version 1.10). .. versionadded:: 1.6 ZRustz*.rsz*.rs.inZrustz text/rust�u8�u16�u32�u64�i8�i16�i32�i64�usize�isize�f32�f64�str�boolz\b)�suffix�Copy�Send�Sized�Sync�Drop�Fn�FnMut�FnOnce�Box�ToOwned�Clone� PartialEq� PartialOrd�Eq�Ord�AsRef�AsMut�Into�From�Default�Iterator�Extend�IntoIterator�DoubleEndedIterator�ExactSizeIterator�Option�Some�None�Result�Ok�Err�SliceConcatExtr �ToString�Vecz #![^[\r\n].*$�basez\nz\s+z//!.*?\nz///(\n|[^/].*?\n)z //(.*?)\nz/\*\*(\n|[^/*])� doccommentz/\*!z/\*�commentz\$([a-zA-Z_]\w*|\(,?|\),?|,?)�as�box�const�crate�else�extern�for�if�impl�in�loop�match�move�mut�pub�ref�return�static�super�trait�unsafe�use�where�while�abstract�alignof�become�do�final�macro�offsetof�override�priv�proc�pure�sizeof�typeof�unsized�virtual�yieldz(true|false)\bzmod\b�modnamezlet\bzfn\b�funcnamez(struct|enum|type|union)\b�typenamez(default)(\s+)(type|fn)\bzself\bz::\bz(?::|->)z&(break|continue)(\s*)(\'[A-Za-z_]\w*)?zA'(\\['"\\nrt]|\\x[0-7][0-9a-fA-F]|\\0|\\u\{[0-9a-fA-F]{1,6}\}|.)'z@b'(\\['"\\nrt]|\\x[0-9a-fA-F]{2}|\\0|\\u\{[0-9a-fA-F]{1,6}\}|.)'z0b[01_]+� number_litz 0o[0-7_]+z0[xX][0-9a-fA-F_]+zJ[0-9][0-9_]*(\.[0-9_]+[eE][+\-]?[0-9_]+|\.[0-9_]*(?!\.)|[eE][+\-]?[0-9_]+)z[0-9][0-9_]*zb"� bytestring�"�stringzb?r(#*)".*?"\1z'staticz '[a-zA-Z_]\w*z [{}()\[\],.;]z[+\-*/%&|<>^!~@=:?]z[a-zA-Z_]\w*z#!?\[z attribute[z.([A-Za-z_]\w*)(!)(\s*)([A-Za-z_]\w*)?(\s*)(\{)zmacro{z)([A-Za-z_]\w*)(!)(\s*)([A-Za-z_]\w*)?(\()zmacro(z[^*/]+z#pushz\*/z#popz[*/]�&z[ui](8|16|32|64|size)zf(32|64)z;\\['"\\nrt]|\\x[0-7][0-9a-fA-F]|\\0|\\u\{[0-9a-fA-F]{1,6}\}z[^\\"]+z\\z\\x[89a-fA-F][0-9a-fA-F]z\{z\}z\(z\)z\[z attribute(�attribute_commonz\];?z[^"\]]+z\);?z[^")]+)�rootrB rD rC rm rn ro rp rs rq zmacro{zmacro(ru z attribute[z attribute(N)r r r r r r r r r r r r r r )#r r! r"