public bool AddRangeEntry(int blockId, int sline, int scol, int eline, int ecol, string src) { ProtoCore.CodeModel.CodeRange range = new ProtoCore.CodeModel.CodeRange() { StartInclusive = new ProtoCore.CodeModel.CodePoint { LineNo = sline, CharNo = scol, SourceLocation = new ProtoCore.CodeModel.CodeFile { FilePath = src } }, EndExclusive = new ProtoCore.CodeModel.CodePoint { LineNo = eline, CharNo = ecol, SourceLocation = new ProtoCore.CodeModel.CodeFile { FilePath = src } } }; KeyValuePair<int, ProtoCore.CodeModel.CodeRange> entry = new KeyValuePair<int, ProtoCore.CodeModel.CodeRange>(blockId, range); RangeTable.Add(entry); if (!FunctionTable.ContainsKey(blockId)) FunctionTable[blockId] = new FunctionRangeTable(); return true; }
public bool AddRangeEntry(int blockId, int sline, int scol, int eline, int ecol, string src) { ProtoCore.CodeModel.CodeRange range = new ProtoCore.CodeModel.CodeRange() { StartInclusive = new ProtoCore.CodeModel.CodePoint { LineNo = sline, CharNo = scol, SourceLocation = new ProtoCore.CodeModel.CodeFile { FilePath = src } }, EndExclusive = new ProtoCore.CodeModel.CodePoint { LineNo = eline, CharNo = ecol, SourceLocation = new ProtoCore.CodeModel.CodeFile { FilePath = src } } }; KeyValuePair <int, ProtoCore.CodeModel.CodeRange> entry = new KeyValuePair <int, ProtoCore.CodeModel.CodeRange>(blockId, range); RangeTable.Add(entry); if (!FunctionTable.ContainsKey(blockId)) { FunctionTable[blockId] = new FunctionRangeTable(); } return(true); }