Enhanced C#
Language of your choice: library documentation
|
A small helper class for languages such as C# and C++ that permit the locations reported by error messages to be remapped. This class stores and applies such commands (#line in C#/C++) More...
A small helper class for languages such as C# and C++ that permit the locations reported by error messages to be remapped. This class stores and applies such commands (#line in C#/C++)
This is part of SourceFileWithLineRemaps. One LineRemapper should be created per real source file.
Public Member Functions | |
void | AddRemap (int realLine, int reportLine, string reportFileName=null) |
Adds a mapping that starts on the specified real line. More... | |
void | EndRemap (int realLine) |
Corresponds to #line default in C#. More... | |
bool | Remap (ref int line, ref string fileName) |
Remaps the specified line number, if a remapping has been created that applies to it. More... | |
|
inline |
Adds a mapping that starts on the specified real line.
In C++ and C#, a directive like "#line 200" affects the line after the preprocessor directive. So if "#line 200" is on line 10, you'd call AddRemap(11, 200) or possibly AddRemap(10, 199).
|
inline |
Corresponds to #line default
in C#.
|
inline |
Remaps the specified line number, if a remapping has been created that applies to it.
line | On entry, a real line number. On exit, a remapped line number |
fileName | This is changed to the user-specified file name string, if and only if a file-name remapping exists and applies here. |
References Loyc.Collections.BDictionary< K, V >.FindUpperBound().
Referenced by Loyc.Syntax.SourceFileWithLineRemaps.IndexToLine().