Commit Graph

183 Commits

Author SHA1 Message Date
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
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
0d32ec028c Add deparse_code_with_fragments_and_map and simplify 2018-01-24 04:23:14 -05:00
rocky
acdefb4f70 NT return_stmt -> return to match AST 2017-12-14 11:03:15 -05:00
rocky
4cd4ad22b6 NT passtmt -> pass to match AST 2017-12-14 05:31:17 -05:00
rocky
b544827192 NT: "forstmt" renamed to "for" to match AST 2017-12-12 12:33:27 -05:00
rocky
7daf95fcb4 NT break_stmt, continue_stmt -> break, continue...
to match AST
2017-12-06 01:48:44 -05:00
rocky
f8d6998b22 NT continue_stmt -> continue to match AST 2017-12-06 01:45:08 -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
eafb32b9a0 NT trystmt -> try_except to match AST 2017-12-02 22:20:45 -05:00
rocky
dfdd5c6c1c NT build_list -> list to match AST 2017-12-01 03:55:31 -05:00
rocky
01b5ed2304 NT mapexpr -> dict to match AST 2017-11-30 15:59:15 -05:00
rocky
ac4d4d1da9 NT dictcomp -> dict_comp to match AST 2017-11-30 08:50:00 -05:00
rocky
0b284f8230 NT setcomp -> set_comp to match AST 2017-11-30 07:14:29 -05:00
rocky
fcdea73b4f list_compr -> list_comp to match AST...
more Python 3 custom rule cleanup
2017-11-29 21:26:31 -05:00
rocky
34117522b2 NT importstmt -> import to match AST 2017-11-29 20:20:54 -05:00
rocky
11e2637eeb NT augassign -> aug_assign to match AST 2017-11-29 10:51:38 -05:00
rocky
7775bdabd5 import_as -> alias; and reinstate rule 2017-11-29 10:38:18 -05:00
rocky
43c3154a55 NT designatore -> store to match AST 2017-11-29 05:05:15 -05:00
rocky
c81b4df8b7 NT binary_subscr -> subscript to match AST 2017-11-29 00:08:08 -05:00
rocky
fb695616a6 NT call_function -> call to match AST 2017-11-28 22:13:23 -05:00
rocky
071207ce48 NT genexpr -> generate_exp to match AST 2017-11-28 17:53:33 -05:00
rocky
af38064a1b remove unpack_list rule and ...
tidy things a bit more
2017-11-25 00:32:13 -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
6746e5167d Add Python 3.6.3 scanner lookup 2017-11-04 11:13:55 -04:00
rocky
9dd881fae1 Start allowing node names in template engine
These are now used to assert we have the right node type.

Simplify import_from
2017-10-13 11:16:58 -04:00
rocky
1392b18bd7 Adjust for spark-parser 2.7.0 incompatabilities 2017-10-10 14:14:26 -04:00
rocky
86305097d2 Go over table-semantics description yet again 2017-10-03 05:42:14 -04:00
rocky
aadea7224d Unit test for format-specifiers
And in the process we catch some small bugs
2017-09-21 11:25:51 -04:00
rocky
da7421da1c Tidy pysource and fragments a little more 2017-09-20 19:02:56 -04:00
rocky
3003070acb engine -> template_engine 2017-09-17 11:56:51 -04:00
rocky
51ad3fb36e Revert one of the changes pending a better fix 2017-09-10 03:01:19 -04:00
rocky
f017acce21 More semantic action cleanup 2017-09-10 02:56:47 -04:00
rocky
0cbafa6e3a Adjust nodeInfo if it is a Token 2017-06-13 04:41:32 -04:00
rocky
4afaee2a36 Add nonterminal node in extractInfo 2017-06-13 04:17:23 -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
bf45260588 Fragment tag array subscripts 2017-06-10 08:05:18 -04:00
rocky
2e05137f2b Set YIELD_VALUE offset in a <yield> expr 2017-06-10 02:09:58 -04:00
rocky
7b2217fda4 Mark "pass" offsets.
Start routine to find previous node.
2017-06-07 22:14:38 -04:00
rocky
5ca219f3d3 Remove hacky fragments try fixup...
hacky call_function code is also not needed or will be reinstated
properly. Better grammar structure for Python 3.6 call_function.
2017-06-06 21:58:47 -04:00
rocky
4615cda03f Important fragments bug fix...
start, finish that had been adjusted wasn't getting reflected in final
returned deparsed.offsets dictionary. Redo keeping API compatibility,
i.e we still use namedtuple NodeInfo.
2017-06-05 21:17:17 -04:00
rocky
844221cd43 Small changes.
fragment tag EXEC_STMT
2017-06-03 23:29:46 -04:00
rocky
9a3e11a957 Fragment bugs
fragment.py:
* deparse_code_aorund_offset: was sometimes returning the wrong type
* capture function name offset
* lint imports

pysource.py: use a clearer variable name
2017-06-03 05:18:40 -04:00
rocky
966a4bc7dc Track changes in ifelstmtr..
in fragments from pysource
2017-06-02 21:15:23 -04:00