+findClassName :: [Token] -> [FoundThing]
+findClassName [] = []
+findClassName [Token n p] = [FoundThing n p]
+findClassName xs = (\((Token n pos):xs) -> FoundThing n pos : findstuff xs) . drop2 . dropParens 0 $ xs
+dropParens n ((Token "(" _ ):xs) = dropParens (n+1) xs
+dropParens 0 (x:xs) = x:xs
+dropParens 1 ((Token ")" _ ):xs) = xs
+dropParens n ((Token ")" _ ):xs) = dropParens (n-1) xs
+dropParens n (x:xs) = dropParens n xs
+-- dropsEverything till token "=>" (if it is on the same line as the
+-- first token. if not return tokens)
+drop2 tokens@(x@(Token _ (Pos _ line_nr _ _ )):xs) =
+ let (line, following) = span (\(Token s (Pos _ l _ _)) -> l == line_nr) tokens
+ (_, following_in_line) = span (\(Token n _) -> n /= "=>") line
+ in case following_in_line of
+ (Token "=>" _:xs) -> xs ++ following
+ _ -> tokens
+drop2 xs = xs