Ticket #311 (closed defect: fixed)
Stand-alone inline comment suppresses any following code
Reported by: | nerdzero | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Cobra Compiler | Version: | 0.9.3 |
Keywords: | tokenizer | Cc: |
Description
Cobra svn:2883 (post 0.9.3) / 2012-12-14 on Mono 2.10.8.1 CLR v4.0.30319 on Ubuntu 12.10
Despite the simplicity of the sample code, in a complex program this bug is incredibly difficult to find. I spent about two hours on this before I finally figured out what was causing the issue.
class CommentBomb def main print 'hello' /# an innocent looking comment #/ print 'goodbye'
outputs:
hello
I tried to fix it but couldn't quite figure out what was going on. It looks like a COMMENT_BLOCK_START is getting consumed instead of an INLINE_COMMENT by CobraTokenizer.
Change History
Note: See
TracTickets for help on using
tickets.