User code region different comment marker

Posts   
 
    
pat
User
Posts: 215
Joined: 02-Mar-2006
# Posted on: 03-Mar-2007 05:11:09   

Hi,

I am trying to create a python template and it doesn't seem possible to change the comment marker in a user code region from

<[ UserCodeRegion "ValidationEntityCode" ]>
        // __LLBLGENPRO_USER_CODE_REGION_START ValidationEntityCode
        // __LLBLGENPRO_USER_CODE_REGION_END
<[ EndUserCodeRegion ]>

to:

<[ UserCodeRegion "ValidationEntityCode" ]>
        # __LLBLGENPRO_USER_CODE_REGION_START ValidationEntityCode
        # __LLBLGENPRO_USER_CODE_REGION_END
<[ EndUserCodeRegion ]>

What can I do please?

Thanks Patrick

PS: At the moment it is setup as a C# template

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39777
Joined: 17-Aug-2003
# Posted on: 03-Mar-2007 12:33:13   

Hmm, that's a bit difficult. The thing is that the TDL interpreter has a regex which has either ' or // implemented as comment marker See the TDLInterpreter class at the top for the Regex. Adding '#' will then work.

Does python have block comment markers? Like /* */ in C# or <!-- --> in html? If so, you could wrap the marker in a block: (html here)

<!-- <[ UserCoreRegion .. ]> // __LLBLGENPRO... -->

// user code

<!-- // __LLBLGENPro... <[ EndUserCodeRegion]> -->
Frans Bouma | Lead developer LLBLGen Pro
pat
User
Posts: 215
Joined: 02-Mar-2006
# Posted on: 04-Mar-2007 04:33:19   

'''
<[ UserCoreRegion .. ]>
// __LLBLGENPRO... 
'''
// user code
'''
// __LLBLGENPro...
<[ EndUserCodeRegion]>
'''

Thanks this worked in Python simple_smile Patrick

pat
User
Posts: 215
Joined: 02-Mar-2006
# Posted on: 06-Mar-2007 19:13:58   

Otis wrote:

Hmm, that's a bit difficult. The thing is that the TDL interpreter has a regex which has either ' or // implemented as comment marker See the TDLInterpreter class at the top for the Regex. Adding '#' will then work. -->

Where would I exactly change the regex please?

Thanks for a sample Patrick

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39777
Joined: 17-Aug-2003
# Posted on: 06-Mar-2007 20:54:14   

In the TDLInterpreter.cs file, almost at the top (you can't miss it). the sourcecode of the task performers is in the SDK.

Frans Bouma | Lead developer LLBLGen Pro