mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Simplify the compiler API section (and remove pseudo code)
This commit is contained in:
parent
cd81e58e3b
commit
dc431fe1f6
@ -37,30 +37,18 @@ If ``solc`` is called with the option ``--link``, all input files are interprete
|
||||
|
||||
.. _compiler-api:
|
||||
|
||||
Using the Compiler API
|
||||
**********************
|
||||
|
||||
The compiler API expects a JSON formatted input and outputs the compilations result in a JSON formatted output.
|
||||
|
||||
See the following pseudo-code:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
// defined by the consumer of the API
|
||||
importCallback(url:string) -> content:string
|
||||
|
||||
// invoking the compiler
|
||||
solc.compile(inputJSON:string, importCallback:function) -> outputJSON:string
|
||||
|
||||
The compiler will ask the ``importCallback`` for each URL defined for a source file and will stop when it succeeds.
|
||||
If all URLs failed, the compilation results in a failure.
|
||||
|
||||
Compiler Input and Output JSON Description
|
||||
******************************************
|
||||
|
||||
.. warning::
|
||||
|
||||
This JSON interface is not yet supported by the Solidity compiler, but will be released in a future version.
|
||||
|
||||
These JSON formats are used by the compiler API as well as are available through ``solc``. These are subject to change,
|
||||
some fields are optional (as noted), but it is aimed at to only make backwards compatible changes.
|
||||
|
||||
The compiler API expects a JSON formatted input and outputs the compilation result in a JSON formatted output.
|
||||
|
||||
Comments are of course not permitted and used here only for explanatory purposes.
|
||||
|
||||
Input Description
|
||||
|
Loading…
Reference in New Issue
Block a user