rocky
a8260edded
3.6 function/class prototype fixes..
...
Had got the order backwards in: class Foo(a=B.c)
String defaults in default parameter tuples need to be quoted
2018-03-03 09:12:02 -05:00
rocky
bb13988126
Instruction fixup broken 3.x make_func...
...
for handling default values
2018-03-02 08:03:51 -05:00
rocky
2edc757b6f
more deparse_code -> code_deparse API additions
2018-03-01 16:55:45 -05:00
rocky
f7439f506a
Fix 3.6 MAKE_FUNCTION for kw params...
...
and remove duplicated attributies in pattr of MAKE_FUNCITON token.
2018-03-01 07:14:46 -05:00
rocky
413df51dfa
Token.format(), shows CONST values better...
...
We were not showing the proper value for None, or False.
Start a unit test for Token().
I think this cleans the Token class up a little more.
More work is needed for MAKE_FUNCTION...
Note: Some debug stuff is commented out in make_funciton.py for upcoming work.
2018-02-28 22:05:12 -05:00
rocky
5c2d0484e5
3.6 MAKE_FUNCTION workarounds
...
Still wrong, but points to diretions for improvements
2018-02-26 09:10:00 -05:00
Yiming Wang
3545c7dc6f
Keep global statements in fixed order
2018-02-24 22:22:50 +08:00
rocky
09efb24a3e
Start distinguishing AST from grammar tree
2018-02-22 11:17:09 -05:00
rocky
bcf437deda
3.x bug in adding extra , in **kargs
2018-01-29 12:03:15 -05:00
rocky
a9df4e3a54
Fix 3.0 .. 3.2 kwargs bug
2018-01-29 09:40:38 -05:00
rocky
3b0eb017b6
Bang on Python 3.6 MAKE_FUNCTION
2017-12-15 07:35:58 -05:00
rocky
c5b8531ef1
Fix last-minute bug due to kwargs->kwargs1
2017-12-10 18:00:44 -05:00
rocky
bbaa3e6602
Fix bug in single param **arg
2017-12-05 07:50:22 -05:00
rocky
2d628acf60
Separate rules for set, tuple, dict from list...
...
Sync fragments.py with pysource
2017-12-05 00:13:17 -05:00
rocky
5fe8303184
Two bugs and a refactor ..
...
1. parse2.py: try except in a loop with a (virtual) continue
treat CONTINUE like JUMP_ABSOLUTE which it is
2. in taking methods off of constants, a parenthesis needs to be added
Some refactoring of global code done
2017-12-03 10:46:22 -05:00
rocky
5ae32de709
Add global statements even for read of globals
2017-12-02 19:13:11 -05:00
rocky
dad1b4780c
Fix bugs in 3.6 default parameter handling
...
Mentioned in Issue #139
2017-12-01 20:12:06 -05:00
rocky
af38064a1b
remove unpack_list rule and ...
...
tidy things a bit more
2017-11-25 00:32:13 -05:00
rocky
0c386d2c39
Fix bug where lambda has a yield in it
2017-11-24 08:55:26 -05:00
rocky
4f0a668b7c
Add flag to tolerate deparse errors...
...
and keep going. The fragment parser should ignore errors
in nested function definitions
2017-11-04 12:29:27 -04:00
rocky
1392b18bd7
Adjust for spark-parser 2.7.0 incompatabilities
2017-10-10 14:14:26 -04:00
rocky
4d58438515
Get ready for release 2.11.5
2017-08-31 09:42:14 -04:00
rocky
ee3202779a
A guard against badly formated bytecode
2017-06-28 18:39:05 -04:00
rocky
9c072a6a42
3.x funciton and annotation bug fixes
2017-06-25 18:46:03 -04:00
rocky
daea3c348c
Fragment tag more expressions
...
Revise make_function3 comment wrt args and kwargs
2017-06-10 16:31:56 -04:00
rocky
267ecda070
Python 3.2 MAKE_FUNCTION again..
...
Was handling bug32/01_named_and_kwargs.py wrong again
2017-06-10 01:42:50 -04:00
rocky
6a991833a3
Attempt to document the MAKE_FUNCTION/MAKE_LAMBDA mess...
...
in Python 3.0+
2017-06-09 06:52:14 -04:00
rocky
28ee3f1257
Correct make_function3 for Pytohn 3.2
2017-06-08 21:49:13 -04:00
rocky
d540146d5a
WIP: start 3.6 MAKE_FUNCTION handling
2017-05-11 07:00:46 -04:00
rocky
e5008693a1
3.3+ bug in handling single kwarg after *
...
Towards fixing issue #110
2017-04-22 04:19:04 -04:00
rocky
be9194c223
annotate args type need to be expr's not constants
2017-04-12 20:12:41 -04:00
rocky
bb24df596d
Bang on 3.x annotations
2017-04-11 17:09:10 -04:00
rocky
e02ebef45d
More Python 3 annotation bugs
2017-01-07 10:27:42 -05:00
rocky
99fce6dfd7
Fix some errors in deparsing Python 3 annotations
2017-01-07 03:03:53 -05:00
rocky
7b8c5e091c
Small Pyhton 3.x annotate bug
2017-01-07 00:21:59 -05:00
rocky
92166452c1
two misc changes
...
- track print_docstring move to help (used in python 3.1)
- verify: allow RETURN_VALUE to match RETURN_END_IF
2016-12-11 08:22:26 -05:00
rocky
d22931cb49
Get ready for release 2.9.7
...
Some of the many lint things. Linting is kind of stupid though.
2016-12-04 09:36:30 -05:00
rocky
c8550d5c9e
Split out print_docstring
...
move from pysource.py to new helper.py
2016-11-22 05:29:50 -05:00
rocky
a81ffe8963
Python 3 bugs ...
...
- Was using "while 1 .. else" improperly
- docstring indent bug: was indenting docstring improperly
2016-11-13 10:08:41 -05:00
rocky
0f536b18fa
Bug in detecting 3.3 default value in lambda
2016-11-10 23:59:51 -05:00
rocky
63e4c9343f
Clean up annotation grammar a little
2016-11-01 15:50:19 -04:00
rocky
eab653afdd
Full Python 3 annotations
2016-11-01 12:21:27 -04:00
rocky
bfd2f77fbc
More source-code line indention in make_function..
...
and remove Python 3 situations from make_function2()
2016-10-30 10:39:11 -04:00
rocky
1574bf4e1e
More annotation processing in to make_function
...
Move return-value annotation determination from n_mkfunc_annotate to
make_function_annotate which is where other kinds of annotation handling
will also need to be done.
2016-10-29 16:03:02 -04:00
rocky
2328ca7a55
Break out make_function() into its own file.
...
It is already too complex and will get worse in Python 3.6.
Note: make_function in fragments.py is still inside and
probably needs fixup.
2016-10-29 07:22:58 -04:00