language-ecmascript-0.17.2.0: JavaScript parser and pretty-printer library

Safe HaskellNone
LanguageHaskell2010

Language.ECMAScript3.Analysis.LabelSets

Description

Deprecated: Use LabelSet from package 'language-ecmascript-analysis'

Label-set analysis which annotates all the statements in the script with their label sets according to ECMAScript specification, section 12.12. The result of this analysis are useful for building control-flow graphs.

Synopsis

Documentation

annotateLabelSets Source #

Arguments

:: Data a 
=> (a -> Set Label)

annotation read function

-> (Set Label -> a -> a)

annotation write function

-> JavaScript a

the script to annotate

-> JavaScript a 

Annotates statements with their label sets; example use:

>>> let jsa = reannotate (\a -> (a, Set.empty))
>>> in  annotateLabelSets jsa snd (\labs (a, ls) -> (a, labs `Set.union` ls))

data Label Source #

Labels are either strings (identifiers) or empty (see 12.12 of the spec)

Constructors

Label String 
EmptyLabel 

Instances

Eq Label Source # 

Methods

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

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

Data Label Source # 

Methods

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

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

toConstr :: Label -> Constr #

dataTypeOf :: Label -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord Label Source # 

Methods

compare :: Label -> Label -> Ordering #

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

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

(>) :: Label -> Label -> Bool #

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

max :: Label -> Label -> Label #

min :: Label -> Label -> Label #

Show Label Source # 

Methods

showsPrec :: Int -> Label -> ShowS #

show :: Label -> String #

showList :: [Label] -> ShowS #