summaryrefslogtreecommitdiff
path: root/Cython/Compiler/Parsing.py
Commit message (Collapse)AuthorAgeFilesLines
* disable a restriction in the f-string format parser that seems arbitrary and ↵Stefan Behnel2016-03-251-2/+0
| | | | difficult to implement
* set FormattedValueNode.format_spec field to None for empty format specs to ↵Stefan Behnel2016-03-231-2/+2
| | | | simplify later "empty" tests
* speed up character switching in f-string parser a littleStefan Behnel2016-03-231-8/+10
|
* simplify some error handling code in f-string parserStefan Behnel2016-03-231-11/+4
|
* reject f-strings for parsed cnamesStefan Behnel2016-03-221-9/+11
|
* whitespaceStefan Behnel2016-03-221-2/+5
|
* remove need for redundant class variableStefan Behnel2016-03-211-1/+1
|
* repair issues found by CPython f-string testsStefan Behnel2016-03-211-24/+35
|
* Py2.6 compatibility fixStefan Behnel2016-03-211-1/+1
|
* Merge branch 'f_string' into f_strings_2Stefan Behnel2016-03-211-26/+204
|\
| * fstrings: remove addressed TODOsJelle Zijlstra2016-03-201-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Docstrings don't support f-strings in cpython, so they don't need to here either. The scanner seems to be working. Current status: - All but three of the tests from CPython's test_fstring pass. Two of the remaining ones rely on exec and the third relies on a runtime NameError that occurs at compile time in Cython. These tests still need to be added to the Cython test suite. - I'm not overly convinced that the refcounting is correct in the C code that's currently emitted. - There's some room for optimization, such as removing empty strings from JoinedStrNode, concatenating adjacent raw strings at compile time, and using _PyUnicodeWriter. - Currently the feature is available in both Python 2 and Python 3 mode. It mostly works in Python 2, except for the !a conversion char.
| * fstrings: fix more bugsJelle Zijlstra2016-03-201-11/+7
| | | | | | | | Not sure about the refcounting
| * f-strings: bugfixesJelle Zijlstra2016-03-201-5/+9
| |
| * f-string parsing: fix bugsJelle Zijlstra2016-03-201-2/+2
| |
| * f-strings: fix nested string literalsJelle Zijlstra2016-03-201-5/+21
| |
| * f strings: initial parsing workJelle Zijlstra2016-03-201-25/+190
| | | | | | | | | | Parses f-strings into ExprNodes, but with no support for compiling them. Some known bugs are marked as TODOs.
* | Allow default template parameters for C++ classes.Robert Bradshaw2016-02-211-5/+17
|/ | | | | | | | This is done with the T=* syntax, similar to default args of cdef methods. This does, however, expose us to types that we can't explicitly declare.
* Merge branch '0.23.x'Stefan Behnel2015-09-061-4/+2
|\ | | | | | | | | Conflicts: CHANGES.rst
| * revert integer literal suffixing again and instead generate C hex literals ↵Stefan Behnel2015-09-061-4/+2
| | | | | | | | if no suffix is used to make the C compiler consider unsigned types for their values (see C standard 6.4.4)
| * rewrite literal DEF integer coercion to constants:Stefan Behnel2015-09-051-3/+2
| | | | | | | | | | - append U-suffix only on coercion when the target type is unsigned - append L/LL-suffix when value looks too large for a smaller constant value type
* | rewrite literal DEF integer coercion to constants:Stefan Behnel2015-09-051-3/+2
| | | | | | | | | | - append U-suffix only on coercion when the target type is unsigned - append L/LL-suffix when value looks too large for a smaller constant value type
* | Merge branch '0.23.x'Stefan Behnel2015-09-021-5/+5
|\ \ | |/ | | | | | | | | Conflicts: Cython/Compiler/Optimize.py Cython/Compiler/StringEncoding.py
| * fix bytes literal creation from compile-time DEF expressions (used to become ↵Stefan Behnel2015-09-021-5/+5
| | | | | | | | Unicode strings due to missing encoding)
* | Merge branch '0.23.x'Stefan Behnel2015-09-011-3/+6
|\ \ | |/
| * correct processing of large integers (PyLong values) in compile time env ↵Stefan Behnel2015-09-011-3/+6
| | | | | | | | under Py2.x
* | adapt grammar to CPython (3.6-pre)Stefan Behnel2015-08-121-2/+5
|/ | | | | - comma at end of any argument list (even in lambdas) - "yield from" does not accept implicit tuple arguments
* replace xrange() by range() to make it work in Py2/Py3Stefan Behnel2015-07-251-2/+2
|
* make code usages of Python "long" compatible with Py2/Py3Stefan Behnel2015-07-251-3/+6
|
* 2to3: Apply the 'except' fixerPetr Viktorin2015-07-251-1/+1
|
* Support operator bool() for C++ classes.Robert Bradshaw2015-07-241-1/+9
|
* adapt async/await implementation to CPython ticket 24619Stefan Behnel2015-07-231-15/+4
| | | | http://bugs.python.org/issue24619
* disable async/await keywords in nested normal 'def' functions (as CPython does)Stefan Behnel2015-07-041-7/+21
|
* correctly disable 'await' keyword when leaving 'async def' contextStefan Behnel2015-07-041-1/+1
|
* Enable overloading the assignment operator.Ian Henriksen2015-06-221-1/+1
|
* remove usage of deprecated "U" file open mode flag which is enabled anywayStefan Behnel2015-05-301-6/+3
|
* implement 'async for' loop statement (PEP 492)Stefan Behnel2015-05-251-15/+15
|
* implement "async with" (PEP 492)Stefan Behnel2015-05-231-8/+12
|
* implement "async def" statement and "await" expression (PEP 492)Stefan Behnel2015-05-231-15/+71
|
* implement PEP 448 also for list/tuple literalsStefan Behnel2015-05-151-25/+29
|
* implement PEP 448 for set/dict literalsStefan Behnel2015-05-141-46/+106
|
* rename KeywordArgsNode to MergedDictNode to generalise itStefan Behnel2015-05-131-1/+1
|
* fix Py3-style class declarations after implementing extended PEP448 ↵Stefan Behnel2015-05-131-2/+0
| | | | unpacking syntax
* fix generator expressions as sole function call argumentStefan Behnel2015-05-121-1/+1
|
* fix missing import in Py3.xStefan Behnel2015-05-121-2/+3
|
* partially implement PEP 448 for function calls onlyStefan Behnel2015-05-121-65/+82
|
* remove unnecessary re-wrapping of identifier name in parserStefan Behnel2015-04-241-1/+1
|
* fix compiler crash due to non-wrapped identifier string in parserStefan Behnel2015-04-241-1/+1
|
* intern identifier names in parser to save memoryStefan Behnel2015-04-241-31/+27
| | | | make sure all identifiers are EncodedString objects
* clean up some whitespace in parser codeStefan Behnel2014-11-231-9/+12
|
* clean up regular expression in parser (not problematic as it only matches ↵Stefan Behnel2014-11-231-1/+1
| | | | what the scanner already accepted)