@token('<STR_LIT>')<EOL>def tokenize_line_comment(text):
result = TokenWithPosition('<STR_LIT>', text.position)<EOL>if text.peek() == '<STR_LIT:%>' and text.peek(-<NUM_LIT:1>) != '<STR_LIT:\\>':<EOL><INDENT>result += text.forward(<NUM_LIT:1>)<EOL>while text.peek() != '<STR_LIT:\n>' and text.hasNext():<EOL><INDENT>result += text.forward(<NUM_LIT:1>)<EOL><DEDENT>return result<EOL><DEDENT>
r"""Process a line comment

    :param Buffer text: iterator over line, with current position

    >>> tokenize_line_comment(Buffer('hello %world'))
    >>> tokenize_line_comment(Buffer('%hello world'))
    '%hello world'
    >>> tokenize_line_comment(Buffer('%hello\n world'))
    '%hello'