[Vala] [Genie] Compile errors related to indent for comment lines



I've noticed that the following code will produce an error when compiling:

[indent=4]
class TestClass : Object
// This is a comment about init
    init
        pass

init
    pass

The error will be: "expected 'tab indent' but got 'init' with previous end of 
line"

I take it that means that instead of my comment after the class line, the 
compiler was expecting a tab indent. Sure enough, if I put a tab before that 
line comment, the program compiles successfully.

I understand the tab sensitivity of Genie, but I'm wondering if it would be 
better to build in logic that ignores lines that only have comments on them.

It's easy for me to adjust my own behaviour to tab indent my comment line, but 
when using a text editor like "Code Browser", code folding manual and 
implemented by using comments which don't seem to auto-indent. I can probably 
get around this too - but it just made me wonder if the tab sensitivity was a 
bit over-sensitive in this case.

Regards
Patrick




    




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]