Jikka-5.0.11.1: A transpiler from Python to C++ for competitive programming
Safe HaskellSafe-Inferred
LanguageHaskell2010

Jikka.Common.Parse.OffsideRule

Synopsis

Documentation

insertIndents :: forall m a. (MonadError Error m, Show a) => a -> a -> (a -> Bool) -> [WithLoc a] -> m [WithLoc a] Source #

insertIndents inserts INDENT and DEDENT tokens with Python's way (https://docs.python.org/3/reference/lexical_analysis.html#indentation). The column of Loc must be 1-based. This doen't use physical line of Loc because logical lines are used for indentation.