Skip to content
Snippets Groups Projects
Commit c5994192 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

[doc] document nonlocal support + CHANGELOG

parent 16d4ef51
No related branches found
No related tags found
No related merge requests found
Changelog
=========
 
0.6.7 (unreleased)
0.7 (unreleased)
------------------
 
- fix line continuation https://github.com/PyCQA/baron/pull/92 by ibizaman
Loading
Loading
@@ -14,6 +14,7 @@ Python 3 parsing:
- support matrix operator https://github.com/PyCQA/baron/pull/117 by odcinek
- support f-strings https://github.com/PyCQA/baron/pull/110 by odcinek
- support numeric literals https://github.com/PyCQA/baron/pull/111 by odcinek
- support nonlocal statement https://github.com/PyCQA/baron/pull/112 by odcinek
 
0.6.6 (2017-06-12)
------------------
Loading
Loading
Loading
Loading
@@ -119,6 +119,26 @@ RedBaron: probably nothing to do (to be confirmed)
 
modify lexer to handle this
 
Nonlocal statement
------------------
Python 3.3 or earlier
Baron: https://github.com/PyCQA/baron/pull/112
RedBaron: TODO
.. image:: ./grammar_diff/nonlocal_statement.png
Action:
::
ADD 'nonlocal' to lexer
ADD 'nonlocal_stmt' to 'small_stmt'
ADD new rule:
nonlocal_stmt: 'nonlocal' NAME (',' NAME)*
TODO
====
 
Loading
Loading
@@ -190,23 +210,6 @@ Action:
ADD ['->' test] to funcdef rule
funcdef: 'def' NAME parameters ['->' test] ':' suite
 
Nonlocal statement
------------------
Python 3.3 or earlier
.. image:: ./grammar_diff/nonlocal_statement.png
Action:
::
ADD 'nonlocal' to lexer
ADD 'nonlocal_stmt' to 'small_stmt'
ADD new rule:
nonlocal_stmt: 'nonlocal' NAME (',' NAME)*
Exec function
-------------
 
Loading
Loading
Loading
Loading
@@ -27,7 +27,7 @@ fplist: fpdef (',' fpdef)* [',']
stmt: simple_stmt | compound_stmt
simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE
small_stmt: (expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt |
import_stmt | global_stmt | exec_stmt | assert_stmt)
import_stmt | global_stmt | nonlocal_stmt | exec_stmt | assert_stmt)
expr_stmt: testlist (augassign (yield_expr|testlist) |
('=' (yield_expr|testlist))*)
augassign: ('+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^=' |
Loading
Loading
@@ -53,6 +53,7 @@ import_as_names: import_as_name (',' import_as_name)* [',']
dotted_as_names: dotted_as_name (',' dotted_as_name)*
dotted_name: NAME ('.' NAME)*
global_stmt: 'global' NAME (',' NAME)*
nonlocal_stmt: 'nonlocal' NAME (',' NAME)*
exec_stmt: 'exec' expr ['in' test [',' test]]
assert_stmt: 'assert' test [',' test]
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment