Wiki

Ticket #106 (closed enhancement: fixed)

Opened 16 years ago

Last modified 16 years ago

Syntactic relaxation: Allow /# and #/ to be indented

Reported by: Chuck Owned by: Chuck
Priority: medium Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: syntax, comments Cc:

Description

In a text editor that maintains indentation when you press ENTER, it is annoying to have to BACKSPACE or HOME to type /#

Also, there is no known advantage to /# and #/ being required at the beginning of the line.

Do not allow tabs and spaces to be mixed prior to the /# or #/.

And there is no requirement that the /# and #/ be aligned with each other.

Attachments

tkt106.patch Download (2.7 KB) - added by hopscc 16 years ago.

Change History

Changed 16 years ago by hopscc

Changed 16 years ago by hopscc

  • owner set to Chuck
  • status changed from new to assigned

patch + test+ relnote.

Its possible to remove the ambiguous comment error message/handling entirely
( in favour of block comment)
by tweaking patch above.

			r'INLINE_COMMENT	\/\#.*\#/',
-			r'COMMENT_BLOCK_START	^\/\#.*$', 
+			r'COMMENT_BLOCK_START	\/\#.*$', 
			r'SINGLE_LINE_COMMENT	\#.*',
-			r'AMBIGUOUS_COMMENT	\/\#.*',

and removing CobraTokenizer refs to AMBIGUOUS_COMMENT and
Tests/110-basic/160-lines-and-comments/302-inline-comment-error.cobra

Changed 16 years ago by Chuck

  • status changed from assigned to closed
  • resolution set to fixed

Patch applied in changeset:2040. Thanks.

I'm leaving the ambiguous comment error for now. We can relax that restriction later, if need be.

Note: See TracTickets for help on using tickets.