parameters: (node)
return_statement: return ("Node", childList)
docstring: Convert recursively a Sofa node into a PSL AST for further processing.
docstring_summary: Convert recursively a Sofa node into a PSL AST for further processing.
docstring_tokens: Convert recursively a Sofa node into a PSL AST for further processing .
function: def nodeToAst(node):
      '''Convert recursively a Sofa node into a PSL AST for further processing.'''
      childList = []
  
      ### Add a list of child to this Node.
      for datafield in node.getListOfDataFields():
          if datafield.isPersistant():
              if datafield.hasParent():
                  childList.append((datafield.name, datafield.getParentPath()))
              else:
                  childList.append((datafield.name, datafield.getValueString()))
  
      for object in node.getObjects():
          o, param  = objectToAst(object)
          childList.append( (o, param)  )
  
      for child in node.getChildren():
          c,l = nodeToAst(child)
          childList.append( (c, l) )
  
      return ("Node", childList)
function_tokens: def nodeToAst ( node ) : childList = [ ] ### Add a list of child to this Node. for datafield in node . getListOfDataFields ( ) : if datafield . isPersistant ( ) : if datafield . hasParent ( ) : childList . append ( ( datafield . name , datafield . getParentPath ( ) ) ) else : childList . append ( ( datafield . name , datafield . getValueString ( ) ) ) for object in node . getObjects ( ) : o , param = objectToAst ( object ) childList . append ( ( o , param ) ) for child in node . getChildren ( ) : c , l = nodeToAst ( child ) childList . append ( ( c , l ) ) return ( "Node" , childList )