Galleondragon / qb64

Automatically exported from code.google.com/p/qb64
Other
264 stars 64 forks source link

IDE: Comment on first line within `TYPE` block should be indented #25

Closed Kroc closed 6 years ago

Kroc commented 6 years ago

Comments placed in the first lines inside a TYPE block should be indented to match the definitions. See picture below for example:

image

ghost commented 6 years ago

I have some reservations about this simply due to the fact that I write comments like this:

' This is a comment
' about the use of the
' foo type in general.
TYPE foo
    ' This is a comment
    ' about how fieldA
    ' is used.
    fieldA AS STRING * 10
    ' Same idea for fieldB.
    fieldB AS INTEGER
END TYPE

In addition, it differs from the formatting of comments inside other blocks like IF...END IF and FOR...NEXT. An exception for TYPE...END TYPE blocks may or may not be feasible, but even if it is, I would rather QB64 allow me to comment as I like. I can always indent/unindent the comment as necessary.

Kroc commented 6 years ago

You misunderstand -- this is how QB64 formats your given text:

image

The first set of comments inside a TYPE definition are always un-indented, when they should really be indented.

FellippeHeitor commented 6 years ago

I'm on it. Thanks for reporting.

FellippeHeitor commented 6 years ago

The development build now contains a fix for the misalignment of the first comment lines of a TYPE block. The issue also affected DECLARE LIBRARY blocks and has also been fixed on that front.