yi-0.6.2.3: The Haskell-Scriptable EditorSource codeContentsIndex
Yi.Syntax.Paren
Description
Parser for haskell that takes in account only parenthesis and layout
Synopsis
indentScanner :: Scanner (AlexState lexState) TT -> Scanner (State Token lexState) TT
isBrace :: TT -> Bool
ignoredToken :: TT -> Bool
isNoise :: Token -> Bool
type Expr t = [Tree t]
data Tree t
= Paren t (Expr t) t
| Block [Tree t]
| Atom t
| Error t
| Expr [Tree t]
getIndentingSubtree :: Tree TT -> Point -> Int -> Maybe (Tree TT)
getSubtreeSpan :: Tree TT -> (Point, Int)
parse :: P TT (Tree TT)
parse' :: (TT -> Token) -> (Token -> TT) -> P TT [Tree TT]
getStrokes :: Point -> Point -> Point -> Tree TT -> [Stroke]
tokenToStroke :: TT -> Stroke
modStroke :: StyleName -> Stroke -> Stroke
tokenToAnnot :: TT -> Maybe (Span String)
Documentation
indentScanner :: Scanner (AlexState lexState) TT -> Scanner (State Token lexState) TTSource
isBrace :: TT -> BoolSource
ignoredToken :: TT -> BoolSource
isNoise :: Token -> BoolSource
type Expr t = [Tree t]Source
data Tree t Source
Constructors
Paren t (Expr t) t
Block [Tree t]
Atom t
Error t
Expr [Tree t]
show/hide Instances
getIndentingSubtree :: Tree TT -> Point -> Int -> Maybe (Tree TT)Source
Search the given list, and return the 1st tree after the given point on the given line. This is the tree that will be moved if something is inserted at the point. Precondition: point is in the given line.
getSubtreeSpan :: Tree TT -> (Point, Int)Source
Given a tree, return (first offset, number of lines).
makeFunctor ''Tree)
parse :: P TT (Tree TT)Source
parse' :: (TT -> Token) -> (Token -> TT) -> P TT [Tree TT]Source
getStrokes :: Point -> Point -> Point -> Tree TT -> [Stroke]Source
tokenToStroke :: TT -> StrokeSource
modStroke :: StyleName -> Stroke -> StrokeSource
tokenToAnnot :: TT -> Maybe (Span String)Source
Produced by Haddock version 2.6.1