Skip to content

Commit af81027

Browse files
committed
Store lineno and filename in Symbol SENTENCE
Now it's mandatory. Drops **kwargs usage, since this allows static analysis.
1 parent 78bb500 commit af81027

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/symbols/sentence.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
class SymbolSENTENCE(Symbol):
1616
""" Defines a BASIC SENTENCE object. e.g. 'BORDER'.
1717
"""
18-
def __init__(self, keyword, *args, **kwargs):
18+
def __init__(self, lineno: int, filename: str, keyword: str, *args):
1919
""" keyword = 'BORDER', or 'PRINT'
2020
"""
21-
assert not kwargs or 'lineno' in kwargs
2221
super(SymbolSENTENCE, self).__init__(*(x for x in args if x is not None))
2322
self.keyword = keyword
24-
self.lineno = kwargs.get('lineno', None)
23+
self.lineno = lineno
24+
self.filename = filename
2525

2626
@property
2727
def args(self):

0 commit comments

Comments
 (0)