mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-43798: Add source location attributes to alias (GH-25324)
* Add source location attributes to alias. * Move alias star construction to pegen helper. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
parent
e05a703848
commit
75a06f067b
11 changed files with 199 additions and 19 deletions
|
@ -62,7 +62,9 @@ class TestAsdlParser(unittest.TestCase):
|
|||
alias = self.types['alias']
|
||||
self.assertEqual(
|
||||
str(alias),
|
||||
'Product([Field(identifier, name), Field(identifier, asname, opt=True)])')
|
||||
'Product([Field(identifier, name), Field(identifier, asname, opt=True)], '
|
||||
'[Field(int, lineno), Field(int, col_offset), '
|
||||
'Field(int, end_lineno, opt=True), Field(int, end_col_offset, opt=True)])')
|
||||
|
||||
def test_attributes(self):
|
||||
stmt = self.types['stmt']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue