示例#1
0
文件: pattern.py 项目: sadboy/AsdlPy
    def visit_PatVar(self, node):
        if dha.isBoundPatVar(node):
            self.bounds.append(dha.Name(node.id))
            return "b"

        else:
            self.unbounds.append(dha.genUnboundVar(node.id))
            return "u"
示例#2
0
文件: pattern.py 项目: sadboy/AsdlPy
    def visit_PatVar(self, node):
        v = st.getFreshNSymbol()

        if dha.isBoundPatVar(node):
            self.bounds.append(dha.Name(v))
            return dha.genUnboundVar(v)

        else:
            self.unbounds.append(dha.Name(v))
            return dha.genUnboundVar(v)