HomePhabricator

Fix bugs in python lexer

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

Provenance
sophiebitsAuthored on
epriestleyCommitted on Jun 6 2014, 12:25 AM
epriestleyPushed on Jun 6 2014, 1:10 AM
Reviewer
Blessed Reviewers
Differential Revision
D9404: Fix bugs in python lexer
Parents
rPHU9b2f35480dc0: Implementation of PhutilLexer for Python
Branches
Unknown
Tags
Unknown

Event Timeline