February 21, 2009 [Issue 2660] Change #line to pragma(line) | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2660 ------- Comment #10 from bugzilla@digitalmars.com 2009-02-20 21:15 ------- #line can be processed with a simple, stupid tool, but pragmas cannot be, because they are recognized at much later stage. The idea of recognizing pragma(line) as 'special' in the lexing stage is an awful hack <g>. -- |
February 21, 2009 [Issue 2660] Change #line to pragma(line) | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2660 ------- Comment #11 from tomas@famolsen.dk 2009-02-21 00:05 ------- clobbing up the # character like that is pretty aweful as well! -- |
February 21, 2009 [Issue 2660] Change #line to pragma(line) | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2660 ------- Comment #12 from clugdbug@yahoo.com.au 2009-02-21 04:41 ------- Like Thomas, I think the existing #line is already a hack. The whole concept of #line is not pretty. The fact that the # character used only in this one place in the language is pretty hard to justify for such a tiny feature, IMHO. As far as I can tell, any sequence of characters could be used for this purpose. pragma(line) would be an even worse hack from the compiler-writers point of view, since it's making two completely different things look the same, but is it really important to the users to know have a strong visual clue of how this feature is implemented? -- |
February 24, 2009 [Issue 2660] Change #line to pragma(line) | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2660 ------- Comment #13 from maxmo@pochta.ru 2009-02-24 02:32 ------- D has entire namespace of tokens __*__ reserved for internal use. How about using it? I don't know at which stage they are processed. They are documented in lexical part of specs. How about this declaration: SpecialTokenSequence: __assume_line__ Integer EndOfLine __assume_line__ Integer Filespec EndOfLine Filespec: " Characters " Any objections? I think, it's a trivial substitution. -- |
Copyright © 1999-2021 by the D Language Foundation