def __init__(self, expr, src=None):
assert isinstance(expr, (TexCmd, TexEnv)), '<STR_LIT>'<EOL>super().__init__()<EOL>self.expr = expr<EOL>self.parent = None<EOL>if src is not None:<EOL><INDENT>self.char_to_line = CharToLineOffset(src)<EOL><DEDENT>else:<EOL><INDENT>self.char_to_line = None<EOL><DEDENT>
Creates TexNode object

        :param TexExpr expr: a LaTeX expression, either a singleton
            command or an environment containing other commands
        :param str src: LaTeX source string