From 2f04633e272c0fb14d2fcf04270f6457f11c928b Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 11 Dec 2018 15:35:32 +0100 Subject: [PATCH] Explain source IDs. --- docs/miscellaneous.rst | 6 +++--- docs/using-the-compiler.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst index 017d5b818..5a6f38756 100644 --- a/docs/miscellaneous.rst +++ b/docs/miscellaneous.rst @@ -224,9 +224,9 @@ for displaying the current position in the source code inside a debugger or for breakpoint handling. Both kinds of source mappings use integer identifiers to refer to source files. -These are regular array indices into a list of source files usually called -``"sourceList"``, which is part of the combined-json and the output of -the json / npm compiler. +The identifier of a source file is stored in +``output['sources'][sourceName]['id']`` where ``output`` is the output of the +standard-json compiler interface parsed as JSON. .. note :: In the case of instructions that are not associated with any particular source file, diff --git a/docs/using-the-compiler.rst b/docs/using-the-compiler.rst index 016ea6e92..4749ef1f1 100644 --- a/docs/using-the-compiler.rst +++ b/docs/using-the-compiler.rst @@ -293,7 +293,7 @@ Output Description // This contains the file-level outputs. In can be limited/filtered by the outputSelection settings. sources: { "sourceFile.sol": { - // Identifier (used in source maps) + // Identifier of the source (used in source maps) id: 1, // The AST object ast: {},