summaryrefslogtreecommitdiff
path: root/2.3-1/macros/ASTManagement/%operatio_string.sci
blob: cc18e919be77f80c4e892d26f338c403d2dab3e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function txt=%operatio_string(O)
//overloading function for "operation" type tlist string function
//this is a node of the AST
//fields:
//     operands: a list
//     operator: a string
if O.operator <> 'rc' & O.operator <> 'cc'
  txt=['Operation'
       '   Operands:'
       '      '+objectlist2string(O.operands)
       '   Operator: '+O.operator
       'EndOperation'
      ]
elseif O.operator == 'rc'
  txt=['   Operands:'
       '      '+objectlist2string(O.operands)
       'Endrc'
      ]
elseif O.operator == 'cc'
  txt=['   Begin:'
       '      '+objectlist2string(O.operands)
       'Endcc'
      ]
end
endfunction