language-python-0.5.4: Parsing and pretty printing of Python code.

Copyright | (c) 2009 Bernie Pope
License | BSD-style
Maintainer | bjpop@csse.unimelb.edu.au
Stability | experimental
Portability | ghc
Safe Haskell | Safe
Language | Haskell98

Language.Python.Common.StringEscape

Contents

- String conversion.
- Digits allowed in octal and hex representation.

Description

Conversion to/from escaped characters in strings. Note: currently does not support escaped Unicode character names.

See:

- Version 2.6 http://www.python.org/doc/2.6/reference/lexical_analysis.html#string-literals
- Version 3.1 http://www.python.org/doc/3.1/reference/lexical_analysis.html#string-and-bytes-literals

Synopsis

- unescapeString :: String -> String
- unescapeRawString :: String -> String
- octalDigits :: String
- hexDigits :: String

# String conversion.

unescapeString :: String -> String #

Convert escaped sequences of characters into real characters in a normal Python string.

unescapeRawString :: String -> String #

# Digits allowed in octal and hex representation.

octalDigits :: String #

The set of valid octal digits in Python.

hexDigits :: String #

The set of valid hex digits in Python.