yi-mode-javascript-0.13.5: Yi editor javascript mode

Safe HaskellNone
LanguageHaskell2010

Yi.Verifier.JavaScript

Contents

Synopsis

Types

data Error Source #

Instances

Eq Error Source # 

Methods

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

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

Show Error Source # 

Methods

showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

data Report Source #

Constructors

Err Error 
Warn Warning 

Instances

Instances

Main code

verify :: Tree TT -> Writer (DList Report) () Source #

The main verifier which calls the sub-verifiers.

checkMultipleFuns :: [Statement TT] -> Writer (DList Report) () Source #

Given a list of function declarations, checks for multiple function declarations, including the functions' subfunctions.

Helper functions

ttEq :: Eq t => Tok t -> Tok t -> Bool Source #

Given two Tok t, compares the ts.

say :: MonadWriter (DList a) m => a -> m () Source #

findFunctions :: [Statement t] -> [Statement t] Source #

Returns a list of the functions in the given block.

funName :: Statement t -> t Source #

Given a FunDecl, returns the token representing the name.

funBody :: Statement t -> [Statement t] Source #

Given a FunDecl, returns its inner body as a list.

nameOf :: Token -> String Source #

Given a ValidName returns the string representing the name.

Misc

dropWhile' :: (a -> Bool) -> [a] -> [a] Source #

Like dropWhile but drops the first element in the result.

dupsBy :: (a -> a -> Bool) -> [a] -> [a] Source #