def transform(self, astNode):
     
     res = AstNode(self.getName())
     
     nameNode = astNode.getChildById('name')
     res.addChild(AstNode('name', nameNode.getText()))
     
     util.addOptionalChildren(astNode, res, 'code')
     
     return res
Exemplo n.º 2
0
 def transform(self, astNode):
     
     res = AstNode(self.getName())
     
     nameNode = AstNode('name', astNode.getChildById('name').getText())
     res.addChild(nameNode)
     
     util.addOptionalChild(astNode, res, 'result')
     util.addOptionalChildren(astNode, res, 'parameter')
     
     return res
Exemplo n.º 3
0
 def transform(self, astNode):
     
     res = AstNode(self.getName())
     
     nameNode = astNode.getChildById('interfaceName')
     res.addChild(AstNode('name', nameNode.getText()))
     
     util.addOptionalChild(astNode, res, 'prefix')
     util.addOptionalChildren(astNode, res, 'method')
     util.addOptionalChildren(astNode, res, 'signal')
     
     return res
Exemplo n.º 4
0
    def transform(self, astNode):
        
        res = AstNode(self.getName())
        
        nameNode = AstNode('name', astNode.getChildById('name').getText())
        res.addChild(nameNode)
            
        util.addOptionalChildren(astNode, res, 'parameter')
        util.addOptionalChild(astNode, res, 'result')
        util.addOptionalChild(astNode, res, 'visi')
        util.addOptionalChild(astNode, res, 'inh')
        util.addOptionalChild(astNode, res, 'scope')

        node = astNode.getChildById('further_params')
        if node:
            res.addChild(AstNode('further_params'))
 
        return res