Skip to content

Commit

Permalink
ignore '\\\n'
Browse files Browse the repository at this point in the history
  • Loading branch information
cantora committed Sep 17, 2012
1 parent fdfef36 commit b32362e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyc_ply_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
'''

literals = ['=', '(', ')', '#']
literals = ['=', '(', ')', '#', '\\']

tokens = (
'INT',
Expand Down Expand Up @@ -86,6 +86,8 @@ def t_newline(t):
r'(\x0d?\x0a)+'
t.lexer.lineno += t.value.count("\n")

t_ignore_ESC_NEWLINE = r'\\\x0d?\x0a'

def t_error(t):
pyc_log.log("illegal character '%s'" % t.value[0])

Expand Down

0 comments on commit b32362e

Please sign in to comment.