Contextualizing keywords
    Daniel Keep 
    daniel.keep.lists at gmail.com
       
    Mon Aug  3 23:46:03 PDT 2009
    
    
  
Michael Mittner wrote:
> Ary Borenszweig wrote:
> 
>> Yes. Maybe every keyword could be just "keyword(...)". For example:
>> keyword(static), keyword(final), etc. For example this code now:
>>
>> pure SomeType foo() {
>> }
>>
>> would be, with this change:
>>
>> keyword(pure) SomeType foo() {
>> }
>>
>> Hmm...
>>
>> Or maybe:
>>
>> @pure void foo() {
>> }
>>
>> :-)
> 
> For future extensibility it should be
> 
> <keyword type="pure"> SomeType foo() { /* ... */ }
> 
> ;)
<function-declaration>
    <pure>true</pure>
    <returnType>SomeType</returnType>
    <name>foo</name>
    <parameters/>
    <body>
        <comment> ... </comment>
    </body>
</function-declaration>
<smilie>:)</smilie>
Using elements instead of attributes allows you to put arbitrary
subexpressions as the value.  :D
    
    
More information about the Digitalmars-d
mailing list