[ create a new paste ] login | about

Link: http://codepad.org/1ZXW52gA    [ raw code | output | fork ]

topia - Python, pasted on Jul 13:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# -*- coding: utf-8 -*-

class Visitor(object):
    def visitCompare(self, node):
        for child in node.getChildNodes(): self.visit(child)
        print 'ひだまりスケッチx365', self.const
    def visitConst(self, node): self.const = node.value

from compiler import parse, walk
walk(parse("""


X / _ / X < "来週も見てくださいね!"


"""), Visitor())


Output:
1
ひだまりスケッチx365 来週も見てくださいね!


Create a new paste based on this one


Comments: