Example #1
0
 def f(index,key): return CA.CAttrCons(self,index,a.tags,args)
 return self.attrparam_table.add(IT.get_key(a.tags,a.args),f)
Example #2
0
import chc.util.StringIndexedTable as SI

import chc.app.CAttributes as CA
import chc.app.CConstExp as CC
import chc.app.CExp as CE
import chc.app.CLHost as CH
import chc.app.CLval as CV
import chc.app.COffsetExp as CO
import chc.app.CTyp as CT
import chc.app.CTypsig as CS


attrparam_constructors = {
    'aint': lambda x:CA.CAttrInt(*x),
    'astr': lambda x:CA.CAttrStr(*x),
    'acons': lambda x:CA.CAttrCons(*x),
    'asizeof': lambda x:CA.CAttrSizeOf(*x),
    'asizeofe': lambda x:CA.CAttrSizeOfE(*x),
    'asizeofs': lambda x:CA.CAttrSizeOfS(*x),
    'aalignof': lambda x:CA.CAttrAlignOf(*x),
    'aalignofe': lambda x:CA.CAttrAlignOfE(*x),
    'aalignofs': lambda x:CA.CAttrAlignOfS(*x),
    'aunop': lambda x:CA.CAttrUnOp(*x),
    'abinop': lambda x:CA.CAttrBinOp(*x),
    'adot': lambda x:CA.CAttrDot(*x),
    'astar': lambda x:CA.CAttrStar(*x),
    'aaddrof': lambda x:CA.CAttrAddrOf(*x),
    'aindex': lambda x:CA.CAttrIndex(*x),
    'aquestion': lambda x:CA.CAttrQuestion(*x)
    }