You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Allow comments in grammar rules. Start working on Python3 class (not
finished). More test organization.
This commit is contained in:
@@ -1,2 +1,15 @@
|
||||
# Tests:
|
||||
#
|
||||
# For Python3:
|
||||
# classdef ::= LOAD_BUILD_CLASS mkfunc LOAD_CONST CALL_FUNCTION_2 designator
|
||||
# mkfunc ::= LOAD_CONST LOAD_CONST MAKE_FUNCTION_0
|
||||
|
||||
# For Python2:
|
||||
# classdef ::= LOAD_CONST expr mkfunc CALL_FUNCTION_0 BUILD_CLASS designator
|
||||
# mkfunc ::= LOAD_CONST MAKE_FUNCTION_0
|
||||
|
||||
class A:
|
||||
pass
|
||||
|
||||
# class B(Exception):
|
||||
# pass
|
||||
|
15
test/simple_source/def/02_def.py
Normal file
15
test/simple_source/def/02_def.py
Normal file
@@ -0,0 +1,15 @@
|
||||
def x0():
|
||||
pass
|
||||
|
||||
def x1(a):
|
||||
pass
|
||||
|
||||
|
||||
def x2(a=5):
|
||||
pass
|
||||
|
||||
def x3(a, b, c=5):
|
||||
pass
|
||||
|
||||
def x4(a, b=5, **c):
|
||||
pass
|
@@ -1,2 +0,0 @@
|
||||
def x0():
|
||||
pass
|
@@ -1,2 +0,0 @@
|
||||
def x1(a):
|
||||
pass
|
Reference in New Issue
Block a user