rocky
a0e3759f76
Towards better 3.6 parameter handling
...
3.6 is still a mess though.
2018-03-01 08:09:53 -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
257c3ca454
Exclude early versions of Python in last change
2018-03-01 00:00:23 -05:00
rocky
e23315b2e6
Fallout from more precise token attributes
2018-02-28 23:35:52 -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
1fe432585e
Keep pre-3.6 listcomp code patterns in 3.6
2018-02-28 16:22:33 -05:00
rocky
b128e4fde6
Fix 3.6+ nested list comprehensions
...
Modified "load_closure" rule and
changed semantic actions since LOAD_CLOSUREs are stored
inside a MAKE_TUPLE.
FIXME: Not sure if we have additional "if" clauses correct. Test and correct
2018-02-28 11:13:52 -05:00
rocky
7eb19a8617
revise API for aligner
2018-02-27 22:02:51 -05:00
rocky
b6d96929cb
Start simplifying higher-level API
2018-02-27 17:48:26 -05:00
rocky
68692abaf6
Start changing API to make version optional...
...
and use debug option dictionary
2018-02-27 11:42:29 -05:00
rocky
55a10d9e20
Remove trepan debug
2018-02-27 11:16:27 -05:00
rocky
e9d1b86a5b
Revise comprehension walking in 3.x...
...
less rigidly and with less magic and more verbiage as to what's going on
2018-02-27 11:13:55 -05:00
rocky
afb90dd12e
3.6+ try/finally bugs
...
Another day another 3.6 bug fix attempted
2018-02-27 10:37:18 -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
rocky
31de0d2af5
3.6 keyword args bugs in CALL_FUNCTION_KW
2018-02-26 07:44:37 -05:00
Yiming Wang
3545c7dc6f
Keep global statements in fixed order
2018-02-24 22:22:50 +08:00
rocky
8463221527
yield before 2.4 may need "None"
2018-02-22 22:26:56 -05:00
rocky
a2b6ebc669
grammar tree -> parse tree
2018-02-22 14:34:42 -05:00
rocky
09efb24a3e
Start distinguishing AST from grammar tree
2018-02-22 11:17:09 -05:00
rocky
a1b2a91d88
== -> is
2018-02-21 18:09:24 -05:00
rocky
859ce2206d
version=None in deparse_code() uses sys.version...
...
(the current interpreter version) as the version to decompile.
Fixes #159 .
2018-02-21 17:40:43 -05:00
rocky
fa4f614295
Wierd comprehension bug seen via new loctraceback
2018-02-15 12:15:49 -05:00
rocky
083ae5f3fd
Add deparsed_find() used by the trepan debuggers
2018-02-15 10:42:00 -05:00
rocky
b5a825f4d8
Fix up 3.6+ CALL_FUNCTION_EX
2018-02-12 07:45:20 -05:00
rocky
730b0549d5
Handle 3.6+ FUNCTION_EX a little more generally
2018-02-12 04:26:52 -05:00
rocky
230a38d537
Fix Python 3.5 CALL_FUNCTION_VAR handling
2018-02-12 03:07:03 -05:00
rocky
6d29ed9077
Python 3.5 CALL_FUNCTION_VAR bugs
2018-02-09 16:48:11 -05:00
rocky
bb45be2dc7
Start to handle 3.5+ BUILD_LIST_UNPACK in call ..
...
to implement multple star arguments
2018-02-09 03:41:13 -05:00
rocky
f7999d2754
Add custom 3.5 handling for f(*a, *b, *c)
2018-02-08 08:42:38 -05:00
rocky
ca2c06ca87
Small cleanups
2018-02-03 11:43:00 -05:00
rocky
be03b22d32
Clean up fragments code for "for"...
...
And make a little more precise.
tag "store" part of "for" in consts.
2018-02-03 11:12:12 -05:00
rocky
9dfd495bfa
Small changes
2018-02-01 17:46:07 -05:00
rocky
576ab98319
List comprehension fragment bugs in 3.4
2018-02-01 09:08:46 -05:00
rocky
555a1235b2
Add fragment rules for RAISE_VARARGS and ...
...
Fix a fragment offset-sorting bug
2018-02-01 00:43:46 -05:00
rocky
a753e2c08f
fragments gen_ast more like pysource gen_ast
...
Skip deparse test for now
2018-01-30 10:28:32 -05:00
rocky
0a12dfb422
Add uncompyle6 option to show fragments
2018-01-29 21:14:34 -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
835124eba2
DRY fragments by using OO more effectively
...
Split grammar customization to its own file. It's quite large now.
2018-01-27 11:02:42 -05:00
rocky
4725624d46
More linestart hacking.
...
Not very successful though
2018-01-27 01:47:56 -05:00
rocky
5e13077fd2
Possibly linemap improvements
2018-01-26 01:56:41 -05:00
rocky
0d32ec028c
Add deparse_code_with_fragments_and_map and simplify
2018-01-24 04:23:14 -05:00
rocky
bd3359b486
linemap and merge fixes
2018-01-22 23:35:30 -05:00
rocky
1b60f5e63b
Fix Linemap bugs
2018-01-22 23:31:48 -05:00
rocky
cbce24d716
Forgot to add linemap file
2018-01-22 23:31:48 -05:00
rocky
9d0bb5e392
Record source-to-translation line mappings
2018-01-22 23:29:59 -05:00
rocky
b873e689db
2.7 compatibility
2018-01-20 22:15:53 -05:00
rocky
bd8563e212
Add missing linemap.py file
2018-01-20 22:04:07 -05:00
rocky
98f9a7d009
Add --weak-verify and --linemap options...
...
Fix bugs in --verify not finding tempfile; remove tempfile
on exit.
2018-01-20 21:55:02 -05:00
rocky
4dbcf0400d
Correct 3.6+ calls with kwargs
2018-01-19 06:38:19 -05:00