Homec4science

Fix bugs in python lexer

Authored by Ben Alpert <spicyjalapeno@gmail.com> on Jun 6 2014, 02:25.

Description

Fix bugs in python lexer

Summary:
Two things:

  • The appearance of \\ or \' or \-followed-by-a-newline in a raw string would improperly end the string
  • A disallowed newline in a string would cause an error instead of trying to continue anyway

Test Plan:
Ran it on a file that was failing for me that was something like:

x = r'\\"'
# hello there

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9404

Details

Committed
epriestley <git@epriestley.com>Jun 6 2014, 02:25
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU9b2f35480dc0: Implementation of PhutilLexer for Python
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU7e75bf271c66: Fix bugs in python lexer (authored by Ben Alpert <spicyjalapeno@gmail.com>).Jun 6 2014, 02:25