Commits

Adrian Prantl committed 400f1774e92
Add support for a #line directive. This patch extends the syntax with a new #line directive that is inspired by the homonymous CPP directive. It can be specified in all locations a #if is legal (Stmt, Decl). Semantics --------- #line 42 "file.swift" This makes diagnostics and debug information behave as if the subsequent lines came from file.swift+42. #line // without arguments This switches back to the main source file and the switches back to the normal line numbering. Any previous #line directives will result in gaps in the main file. Rationale --------- LLDB and the REPL need this for making expressions that are entered into the expression evaluator or REPL debugable. For more info see <rdar://problem/17441710> Need #line directive or something similar so we can enhance the debugging of expressions and REPL Also, I believe the stdlib would benefit from this and it would allow us to get rid of the line-directive wrapper script. Swift SVN r19384