Working on #48 : Added BaseExprParser and BaseNodeParser.py
This commit is contained in:
@@ -6,7 +6,7 @@ import core.utils
|
||||
from core.builtin_concepts import BuiltinConcepts
|
||||
from core.sheerka.services.SheerkaExecute import ParserInput
|
||||
from core.tokenizer import TokenKind
|
||||
from parsers.BaseParser import BaseParser, Node, ParsingError
|
||||
from parsers.BaseParser import BaseParser, Node, ParsingError, BaseParserInputParser
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -107,7 +107,7 @@ class PythonGetNamesVisitor(ast.NodeVisitor):
|
||||
self.names.add(node.id)
|
||||
|
||||
|
||||
class PythonParser(BaseParser):
|
||||
class PythonParser(BaseParserInputParser):
|
||||
"""
|
||||
Parse Python scripts
|
||||
"""
|
||||
@@ -116,7 +116,7 @@ class PythonParser(BaseParser):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
BaseParser.__init__(self, PythonParser.NAME, 50)
|
||||
BaseParserInputParser.__init__(self, PythonParser.NAME, 50)
|
||||
self.source = kwargs.get("source", "<undef>")
|
||||
|
||||
def parse(self, context, parser_input: ParserInput):
|
||||
|
||||
Reference in New Issue
Block a user