solidity/docs
Noel Maersk a481ea719f
docs: use Yul lexer to highlight Yul code segments.
Many commits squashed; turns out that with the combination of:

* Python v2.7,
* Sphinx v1.8.5, and
* Pygments v2.3.1

versions (old!) used in the CI, the only viable approach is:

* to use `code-block` directives with explicit language specification,
* to provide no file-local default using `highlight`, and
* to set language as `none` for grammar specifications.

Underlying are the following issues (again, for the old versions
listed above):

* Generic RST `code` doesn't work when language is `none`:

    Warning, treated as error:
    /root/project/docs/yul.rst:430:Cannot analyze code. No Pygments lexer found for "none".

  Additionally, it might be trying to fall back to the default
  (Solidity) if left unspecified.

* If a file-local default is specified using `highlight`, then
  `code-block` _must_ also provide a language:

    Warning, treated as error:
    /root/project/docs/yul.rst:185:Error in "code-block" directive:
    1 argument(s) required, 0 supplied.

* Sphinx seems to try the file-local default "yul" (specified with
  `highlight`) on `code` marked having language `json`:

    Warning, treated as error:
    /root/project/docs/yul.rst:130:Could not lex literal_block as "yul". Highlighting skipped.

* The only well-lexed highlighter for two of the three grammar
  specifications is `peg`, but it was added in Pygments v2.6.
  One of the grammars - in the "Formal Specification" section,
  the one after "We will use a destructuring notation for the
  AST nodes." - _must_ be left unhighlighted, with language set
  to `none`: all lexers do really poorly.

... And one should never, ever start treating warnings as mere
warnings, without having exhausted all other options.

Otherwise, it's a slippery slope, - and look where that brought
Gandhi: to being a strawman in every lousy argument to be had!..
2020-04-26 20:48:07 +03:00
..
_static docs: add dark mode to documentation 2020-04-20 20:23:45 +04:00
_templates docs: add dark mode to documentation 2020-04-20 20:23:45 +04:00
contracts docs: fix formatting errors and style inconsistencies 2020-04-20 20:24:31 +04:00
examples docs: fix formatting errors and style inconsistencies 2020-04-20 20:24:31 +04:00
internals Restructure documentation and improve TOC. 2020-04-23 19:05:42 +02:00
types docs: fix formatting errors and style inconsistencies 2020-04-20 20:24:31 +04:00
050-breaking-changes.rst Adds script which compiles docs example with minimum compiler version. 2020-03-18 19:27:38 +01:00
060-breaking-changes.rst Adds non-language related breaking changes to docs. 2019-12-17 17:02:04 +01:00
abi-spec.rst Explain nonpayable 2020-04-23 01:35:21 +02:00
assembly.rst Adds script which compiles docs example with minimum compiler version. 2020-03-18 19:27:38 +01:00
bugs_by_version.json Prepare 0.6.6 2020-04-09 11:55:21 +02:00
bugs.json Add missing blog URLs to bugs.json 2020-04-22 12:03:10 +01:00
bugs.rst Fixes u256 overflow in logical shift optimization rule and adds tests. 2019-03-13 11:19:20 +01:00
cheatsheet.rst Restructure documentation and improve TOC. 2020-04-23 19:05:42 +02:00
common-patterns.rst Docs common patterns 2019-12-13 16:42:24 +01:00
conf.py docs: use Yul lexer to highlight Yul code segments. 2020-04-26 20:48:07 +03:00
contracts.rst Update contracts. 2019-12-12 12:52:18 +01:00
contributing.rst Update evmone version to v0.4 in docs and scripts 2020-04-14 14:34:47 +02:00
control-structures.rst Adds script which compiles docs example with minimum compiler version. 2020-03-18 19:27:38 +01:00
grammar.rst Restructure documentation and improve TOC. 2020-04-23 19:05:42 +02:00
index.rst Restructure documentation and improve TOC. 2020-04-23 19:05:42 +02:00
installing-solidity.rst docs: fix formatting errors and style inconsistencies 2020-04-20 20:24:31 +04:00
introduction-to-smart-contracts.rst docs: fix formatting errors and style inconsistencies 2020-04-20 20:24:31 +04:00
layout-of-source-files.rst Adds script which compiles docs example with minimum compiler version. 2020-03-18 19:27:38 +01:00
logo.svg Import logo from browser-solidity#16e74469 2017-06-05 11:20:35 +01:00
make.bat Remove trailing whitespace for all files in the repository. 2018-09-04 11:30:30 +02:00
Makefile Imported documentation. 2015-12-07 22:35:51 +01:00
metadata.rst Fix the latest byte of metadata hash encoding in the docs 2020-01-20 17:13:40 +03:00
natspec-format.rst docs: fix formatting errors and style inconsistencies 2020-04-20 20:24:31 +04:00
requirements.txt docs: use Yul lexer to highlight Yul code segments. 2020-04-26 20:48:07 +03:00
resources.rst Add new resources and change sort order 2020-01-08 10:11:08 +01:00
security-considerations.rst Add internal function calls to CHC docs 2020-04-22 20:15:01 +02:00
solidity-by-example.rst Add basic modular contract example 2019-02-15 13:55:38 -07:00
Solidity.g4 Tests, Changelog and updated grammar 2020-04-23 17:27:37 +05:30
structure-of-a-contract.rst Implement override checking 2019-10-30 17:31:33 +01:00
style-guide.rst docs: fix formatting errors and style inconsistencies 2020-04-20 20:24:31 +04:00
types.rst docs: fix formatting errors and style inconsistencies 2020-04-20 20:24:31 +04:00
units-and-global-variables.rst Merge pull request #8642 from ethereum/interfaceid 2020-04-23 12:24:49 +02:00
using-the-compiler.rst docs: fix formatting errors and style inconsistencies 2020-04-20 20:24:31 +04:00
yul.rst docs: use Yul lexer to highlight Yul code segments. 2020-04-26 20:48:07 +03:00