FingerText icon indicating copy to clipboard operation
FingerText copied to clipboard

looping snippet

Open gwarah opened this issue 8 years ago • 0 comments

Let's suppose I intent to insert some attributes with their getters/setterrs methods, so would be nice if it's possible by a looping snippet like this one (example in vb script):

  1. trigger

vbs-attributes(name,age)

  1. linked to these hypothetical snippet:
'''''''''''
' atributes
'''''''''''
$[![(repeat)
private $[![(var)]!]
]!]
 
'''''''''''
' getters and letters 
'''''''''''
$[![(repeat)
    ' attribute $[![(var)]!]
    Public Property Let fun$[![(var)]!](pTxt)
        $[![(var)]!] = pTxt
    End Property
    
    Public Property Get fun$[![(var)]!]()
        fun$[![(var)]!] = $[![(var)]!]
    End Property
]!]


  1. resulting in:
'''''''''''
' atributes
'''''''''''
private name
private age

'''''''''''
' getters and letters 
'''''''''''
' attribute name
Public Property Let funname(pTxt)
      name = pTxt
End Property
    
Public Property Get funname()
      funname = name
End Property

' attribute age
Public Property Let funage(pTxt)
      age = pTxt
End Property
    
Public Property Get funage()
      funage = ageEnd Property
End Property

It's it possible? How?

gwarah avatar Feb 02 '17 20:02 gwarah