flp-0.1.0.0: A layout spec language for memory managers implemented in Rust.

Copyright(c) Alec Theriault 2017-2018
LicenseBSD-style
Maintaineralec.theriault@gmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Language.Rust.Syntax.Token

Description

Contains roughly the same stuff as syntax::parse::token - data definitions for tokens.

Synopsis

Documentation

data Token Source #

A general token (based on syntax::parse::token::Token).

Unlike its libsyntax counterpart, Token has folded in syntax::parse::token::BinOpToken and syntax::parse::token::BinOpEqToken as regular tokens.

Constructors

Equal

= token

Less

< token

Greater

> token

Ampersand

& token

Pipe

| token

Exclamation

! token

Tilde

~ token

Plus

+ token

Minus

- token

Star

* token

Slash

/ token

Percent

% token

Caret

^ token

GreaterEqual

>= token

GreaterGreaterEqual

>>= token

AmpersandAmpersand

&& token

PipePipe

|| token

LessLess

<< token

GreaterGreater

>> token

EqualEqual

== token

NotEqual

!= token

LessEqual

<= token

LessLessEqual

<<= token

MinusEqual

-= token

AmpersandEqual

&= token

PipeEqual

|= token

PlusEqual

+= token

StarEqual

*= token

SlashEqual

/= token

CaretEqual

^= token

PercentEqual

%= token

At

@ token

Dot

. token

DotDot

.. token

DotDotEqual

..= token

DotDotDot

... token

Comma

, token

Semicolon

; token

Colon

: token

ModSep

:: token

RArrow

-> token

LArrow

<- token

FatArrow

=> token

Pound

# token

Dollar

$ token

Question

? token

EmbeddedCode String

${ ... } token containing embedded code

EmbeddedIdent String

${ ... } token containing embedded code

OpenDelim !Delim

One of (, [, {

CloseDelim !Delim

One of ), ], }

LiteralTok LitTok (Maybe Name)

a literal token with an optional suffix (something like i32)

IdentTok Ident

an arbitrary identifier (something like x or foo or and_then)

LifetimeTok Ident

a lifetime (something like 'a or 'static)

Space Space Name

whitespace

Doc String !AttrStyle !Bool

doc comment with its contents, whether it is outer/inner, and whether it is inline or not

Shebang

#! shebang token

Eof

end of file token

Interpolated (Nonterminal Span)

can be expanded into several tokens in macro-expansion

Instances
Eq Token Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

(==) :: Token -> Token -> Bool #

(/=) :: Token -> Token -> Bool #

Data Token Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Token -> c Token #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Token #

toConstr :: Token -> Constr #

dataTypeOf :: Token -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Token) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Token) #

gmapT :: (forall b. Data b => b -> b) -> Token -> Token #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Token -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Token -> r #

gmapQ :: (forall d. Data d => d -> u) -> Token -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Token -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Token -> m Token #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Token -> m Token #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Token -> m Token #

Ord Token Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

compare :: Token -> Token -> Ordering #

(<) :: Token -> Token -> Bool #

(<=) :: Token -> Token -> Bool #

(>) :: Token -> Token -> Bool #

(>=) :: Token -> Token -> Bool #

max :: Token -> Token -> Token #

min :: Token -> Token -> Token #

Show Token Source #

This instance is only for error messages and debugging purposes.

Instance details

Defined in Language.Rust.Syntax.Token

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

Generic Token Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Associated Types

type Rep Token :: Type -> Type #

Methods

from :: Token -> Rep Token x #

to :: Rep Token x -> Token #

NFData Token Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

rnf :: Token -> () #

Pretty Token Source # 
Instance details

Defined in Language.Rust.Pretty

type Rep Token Source # 
Instance details

Defined in Language.Rust.Syntax.Token

type Rep Token = D1 (MetaData "Token" "Language.Rust.Syntax.Token" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (((((C1 (MetaCons "Equal" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Less" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Greater" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "Ampersand" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Pipe" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Exclamation" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Tilde" PrefixI False) (U1 :: Type -> Type)))) :+: ((C1 (MetaCons "Plus" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Minus" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Star" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "Slash" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Percent" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Caret" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "GreaterEqual" PrefixI False) (U1 :: Type -> Type))))) :+: (((C1 (MetaCons "GreaterGreaterEqual" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "AmpersandAmpersand" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "PipePipe" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "LessLess" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "GreaterGreater" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "EqualEqual" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "NotEqual" PrefixI False) (U1 :: Type -> Type)))) :+: (((C1 (MetaCons "LessEqual" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "LessLessEqual" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "MinusEqual" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "AmpersandEqual" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "PipeEqual" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "PlusEqual" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "StarEqual" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "SlashEqual" PrefixI False) (U1 :: Type -> Type)))))) :+: ((((C1 (MetaCons "CaretEqual" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "PercentEqual" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "At" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "Dot" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "DotDot" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "DotDotEqual" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "DotDotDot" PrefixI False) (U1 :: Type -> Type)))) :+: ((C1 (MetaCons "Comma" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Semicolon" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Colon" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "ModSep" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "RArrow" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "LArrow" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "FatArrow" PrefixI False) (U1 :: Type -> Type))))) :+: (((C1 (MetaCons "Pound" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Dollar" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Question" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "EmbeddedCode" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "EmbeddedIdent" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))) :+: (C1 (MetaCons "OpenDelim" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Delim)) :+: C1 (MetaCons "CloseDelim" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Delim))))) :+: (((C1 (MetaCons "LiteralTok" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LitTok) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Name))) :+: C1 (MetaCons "IdentTok" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :+: (C1 (MetaCons "LifetimeTok" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) :+: C1 (MetaCons "Space" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Space) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name)))) :+: ((C1 (MetaCons "Doc" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 AttrStyle) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool))) :+: C1 (MetaCons "Shebang" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Eof" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Interpolated" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Nonterminal Span)))))))))

spaceNeeded :: Token -> Token -> Bool Source #

Check whether a space is needed between two tokens to avoid confusion.

data Space Source #

Rust is whitespace independent. Short of providing space between tokens, whitespace is all the same to the parser.

Constructors

Whitespace

usual white space: [\ \t\n\f\v\r]+

Comment

comment (either inline or not)

Instances
Bounded Space Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Enum Space Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Eq Space Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

(==) :: Space -> Space -> Bool #

(/=) :: Space -> Space -> Bool #

Data Space Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Space -> c Space #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Space #

toConstr :: Space -> Constr #

dataTypeOf :: Space -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Space) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Space) #

gmapT :: (forall b. Data b => b -> b) -> Space -> Space #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Space -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Space -> r #

gmapQ :: (forall d. Data d => d -> u) -> Space -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Space -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Space -> m Space #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Space -> m Space #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Space -> m Space #

Ord Space Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

compare :: Space -> Space -> Ordering #

(<) :: Space -> Space -> Bool #

(<=) :: Space -> Space -> Bool #

(>) :: Space -> Space -> Bool #

(>=) :: Space -> Space -> Bool #

max :: Space -> Space -> Space #

min :: Space -> Space -> Space #

Show Space Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

showsPrec :: Int -> Space -> ShowS #

show :: Space -> String #

showList :: [Space] -> ShowS #

Generic Space Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Associated Types

type Rep Space :: Type -> Type #

Methods

from :: Space -> Rep Space x #

to :: Rep Space x -> Space #

NFData Space Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

rnf :: Space -> () #

type Rep Space Source # 
Instance details

Defined in Language.Rust.Syntax.Token

type Rep Space = D1 (MetaData "Space" "Language.Rust.Syntax.Token" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "Whitespace" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Comment" PrefixI False) (U1 :: Type -> Type))

data Delim Source #

A delimiter token (syntax::parse::token::DelimToken).

Constructors

Paren

round parenthesis: ( or )

Bracket

square bracket: [ or ]

Brace

curly brace: { or }

NoDelim

empty delimiter

Instances
Bounded Delim Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Enum Delim Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Eq Delim Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

(==) :: Delim -> Delim -> Bool #

(/=) :: Delim -> Delim -> Bool #

Data Delim Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Delim -> c Delim #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Delim #

toConstr :: Delim -> Constr #

dataTypeOf :: Delim -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Delim) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Delim) #

gmapT :: (forall b. Data b => b -> b) -> Delim -> Delim #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Delim -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Delim -> r #

gmapQ :: (forall d. Data d => d -> u) -> Delim -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Delim -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Delim -> m Delim #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Delim -> m Delim #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Delim -> m Delim #

Ord Delim Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

compare :: Delim -> Delim -> Ordering #

(<) :: Delim -> Delim -> Bool #

(<=) :: Delim -> Delim -> Bool #

(>) :: Delim -> Delim -> Bool #

(>=) :: Delim -> Delim -> Bool #

max :: Delim -> Delim -> Delim #

min :: Delim -> Delim -> Delim #

Show Delim Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

showsPrec :: Int -> Delim -> ShowS #

show :: Delim -> String #

showList :: [Delim] -> ShowS #

Generic Delim Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Associated Types

type Rep Delim :: Type -> Type #

Methods

from :: Delim -> Rep Delim x #

to :: Rep Delim x -> Delim #

NFData Delim Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

rnf :: Delim -> () #

type Rep Delim Source # 
Instance details

Defined in Language.Rust.Syntax.Token

type Rep Delim = D1 (MetaData "Delim" "Language.Rust.Syntax.Token" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((C1 (MetaCons "Paren" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Bracket" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Brace" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "NoDelim" PrefixI False) (U1 :: Type -> Type)))

data LitTok Source #

A literal token (syntax::parse::token::Lit)

Constructors

ByteTok Name

byte

CharTok Name

character

IntegerTok Name

integral literal (could have type i32, int, u128, etc.)

FloatTok Name

floating point literal (could have type f32, f64, etc.)

StrTok Name

string literal

StrRawTok Name !Int

raw string literal and the number of # marks around it

ByteStrTok Name

byte string literal

ByteStrRawTok Name !Int

raw byte string literal and the number of # marks around it

Instances
Eq LitTok Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

(==) :: LitTok -> LitTok -> Bool #

(/=) :: LitTok -> LitTok -> Bool #

Data LitTok Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LitTok -> c LitTok #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LitTok #

toConstr :: LitTok -> Constr #

dataTypeOf :: LitTok -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LitTok) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LitTok) #

gmapT :: (forall b. Data b => b -> b) -> LitTok -> LitTok #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LitTok -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LitTok -> r #

gmapQ :: (forall d. Data d => d -> u) -> LitTok -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LitTok -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LitTok -> m LitTok #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LitTok -> m LitTok #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LitTok -> m LitTok #

Ord LitTok Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Show LitTok Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Generic LitTok Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Associated Types

type Rep LitTok :: Type -> Type #

Methods

from :: LitTok -> Rep LitTok x #

to :: Rep LitTok x -> LitTok #

NFData LitTok Source # 
Instance details

Defined in Language.Rust.Syntax.Token

Methods

rnf :: LitTok -> () #

Pretty LitTok Source # 
Instance details

Defined in Language.Rust.Pretty

type Rep LitTok Source # 
Instance details

Defined in Language.Rust.Syntax.Token

type Rep LitTok = D1 (MetaData "LitTok" "Language.Rust.Syntax.Token" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (((C1 (MetaCons "ByteTok" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name)) :+: C1 (MetaCons "CharTok" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name))) :+: (C1 (MetaCons "IntegerTok" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name)) :+: C1 (MetaCons "FloatTok" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name)))) :+: ((C1 (MetaCons "StrTok" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name)) :+: C1 (MetaCons "StrRawTok" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))) :+: (C1 (MetaCons "ByteStrTok" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name)) :+: C1 (MetaCons "ByteStrRawTok" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))))

data AttrStyle Source #

Distinguishes between attributes that are associated with the node that follows them and attributes that are associated with the node that contains them (syntax::ast::AttrStyle). These two cases need to be distinguished only for pretty printing - they are otherwise fundamentally equivalent.

Example: #[repr(C)] is an outer attribute while #![feature(slice_patterns)] is an inner one

Constructors

Outer 
Inner 
Instances
Bounded AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Eq AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AttrStyle -> c AttrStyle #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AttrStyle #

toConstr :: AttrStyle -> Constr #

dataTypeOf :: AttrStyle -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AttrStyle) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AttrStyle) #

gmapT :: (forall b. Data b => b -> b) -> AttrStyle -> AttrStyle #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AttrStyle -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AttrStyle -> r #

gmapQ :: (forall d. Data d => d -> u) -> AttrStyle -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AttrStyle -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AttrStyle -> m AttrStyle #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AttrStyle -> m AttrStyle #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AttrStyle -> m AttrStyle #

Ord AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Show AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep AttrStyle :: Type -> Type #

NFData AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: AttrStyle -> () #

type Rep AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep AttrStyle = D1 (MetaData "AttrStyle" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "Outer" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Inner" PrefixI False) (U1 :: Type -> Type))