示例#1
0
class Enter(Token):
    def __init__(self, lexer, parser, parent):
        Token.__init__(self, 'Enter', lexer, parser, parent)

        lexer.expect(self, 'keyword', 'enter')
        lexer.skip(['whitespace', 'newline'])

        self.execute = Execute(lexer, parser, parent, '')

    def value(self, context):
        return self.execute.value(context)

    def dump(self, indent = 0):
        print((' ' * indent) + self.name)
        self.execute.dump(indent + 1)
示例#2
0
class Enter(Token):
    def __init__(self, lexer, parser, parent):
        Token.__init__(self, "Enter", lexer, parser, parent)

        lexer.expect(self, "keyword", "enter")
        lexer.skip(["whitespace", "newline"])

        self.execute = Execute(lexer, parser, parent, "")

    def value(self, context):
        return self.execute.value(context)

    def dump(self, indent=0):
        print(" " * indent) + self.name
        self.execute.dump(indent + 1)
示例#3
0
class Enter(Token):
    def __init__(self, lexer, parser, parent):
        Token.__init__(self, 'Enter', lexer, parser, parent)

        lexer.expect(self, 'keyword', 'enter')
        lexer.skip(['whitespace', 'newline'])

        self.execute = Execute(lexer, parser, parent, '')

    def value(self, context):
        return self.execute.value(context)

    def dump(self, indent=0):
        print(' ' * indent) + self.name
        self.execute.dump(indent + 1)