-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | JavaScript analysis library -- -- Includes a label set analysis and a lexical environment analysis @package language-ecmascript-analysis @version 0.9 -- | 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. module Language.ECMAScript3.Analysis.LabelSet -- | 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)) --annotateLabelSets :: Data a => (a -> Set Label) -> (Set Label -> a -> a) -> JavaScript a -> JavaScript a -- | Labels are either strings (identifiers) or empty (see 12.12 of -- the spec) data Label Label :: String -> Label EmptyLabel :: Label instance Typeable Label instance Ord Label instance Eq Label instance Show Label instance Data Label -- | A lexical environment analysis of ECMAScript programs module Language.ECMAScript3.Analysis.LexicalEnvironment env :: Map String SourcePos -> [Statement SourcePos] -> (EnvTree, Map String SourcePos) localVars :: [Statement SourcePos] -> [(String, SourcePos)] -- | The statically-determinate lexical structure of a JavaScript program. data EnvTree EnvTree :: (Map String SourcePos) -> [EnvTree] -> EnvTree