From fa9e189d90a35f2ce4b7fc145c994828f34b3548 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Sat, 7 Jul 2018 11:33:54 +0200 Subject: erl_docgen: Add new internal docs chapter to docs --- lib/erl_docgen/priv/xsl/db_html.xsl | 76 ++++++++++++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl index c9be926e1e..4351c324ca 100644 --- a/lib/erl_docgen/priv/xsl/db_html.xsl +++ b/lib/erl_docgen/priv/xsl/db_html.xsl @@ -836,6 +836,10 @@ + + + + @@ -859,11 +863,17 @@ - + + + + + + + @@ -902,6 +912,9 @@
  • Reference Manual
  • + +
  • Internal Documentation
  • +
  • Release Notes
  • @@ -942,6 +955,7 @@ + @@ -955,6 +969,11 @@ + + + + + @@ -1311,6 +1330,61 @@ + + + + + + + + + + + + + +
    + +

    Internal Docs

    + +

    Version

    +

    +
    +
    +
    + + + + + + + + + +
    +
    + + + +

    +

    Internal Documentation

    +

    Version

    + + + + + +

    Chapters

    + +
      + + + + +
    +
    +
    +
    -- cgit v1.2.3 From e05c018328cbb0b473817e5d689ba8118442757b Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 28 Aug 2018 13:31:17 +0200 Subject: compiler: Add internal docs section --- lib/compiler/doc/src/Makefile | 11 +++++++- lib/compiler/doc/src/book.xml | 3 ++ lib/compiler/doc/src/internal.xml | 37 ++++++++++++++++++++++++ lib/erl_docgen/priv/xsl/db_html.xsl | 47 +++++++++++++++++++++++++++---- lib/erl_docgen/src/docgen_edoc_xml_cb.erl | 14 +++++---- 5 files changed, 100 insertions(+), 12 deletions(-) create mode 100644 lib/compiler/doc/src/internal.xml (limited to 'lib') diff --git a/lib/compiler/doc/src/Makefile b/lib/compiler/doc/src/Makefile index 32f150eef8..6ef4595ff3 100644 --- a/lib/compiler/doc/src/Makefile +++ b/lib/compiler/doc/src/Makefile @@ -31,6 +31,7 @@ APPLICATION=compiler # Release directory specification # ---------------------------------------------------- RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) +COMPILER_DIR = $(ERL_TOP)/lib/compiler/src # ---------------------------------------------------- # Target Specs @@ -38,7 +39,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) XML_APPLICATION_FILES = ref_man.xml XML_REF3_FILES = compile.xml -XML_PART_FILES = +XML_PART_FILES = internal.xml XML_CHAPTER_FILES = notes.xml BOOK_FILES = book.xml @@ -49,6 +50,9 @@ XML_FILES = \ $(BOOK_FILES) $(XML_CHAPTER_FILES) \ $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES) +XML_INTERNAL_FILES = \ + cerl.xml cerl_trees.xml + # ---------------------------------------------------- HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \ @@ -62,6 +66,8 @@ HTML_REF_MAN_FILE = $(HTMLDIR)/index.html TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf +XML_GEN_FILES = $(XML_INTERNAL_FILES:%=$(XMLDIR)/%) + # ---------------------------------------------------- # FLAGS # ---------------------------------------------------- @@ -85,6 +91,9 @@ man: $(MAN3_FILES) gifs: $(GIF_FILES:%=$(HTMLDIR)/%) +$(XML_INTERNAL_FILES:%=$(XMLDIR)/%): $(COMPILER_DIR)/$(@:$(XMLDIR)/%.xml=%.erl) + $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(COMPILER_VSN) -dir $(XMLDIR) $(COMPILER_DIR)/$(@:$(XMLDIR)/%.xml=%.erl) + debug opt: clean clean_docs: diff --git a/lib/compiler/doc/src/book.xml b/lib/compiler/doc/src/book.xml index af6b4cf47a..d101d40cb4 100644 --- a/lib/compiler/doc/src/book.xml +++ b/lib/compiler/doc/src/book.xml @@ -38,6 +38,9 @@ + + + diff --git a/lib/compiler/doc/src/internal.xml b/lib/compiler/doc/src/internal.xml new file mode 100644 index 0000000000..833c788083 --- /dev/null +++ b/lib/compiler/doc/src/internal.xml @@ -0,0 +1,37 @@ + + + + +
    + + 20182018 + Ericsson AB. All Rights Reserved. + + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + + Compiler Internal Documentation + Lukas Larsson + + 2018-07-07 + 1.0.0 + internal.xml +
    + + + + +
    + diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl index 4351c324ca..18bc8cd1cf 100644 --- a/lib/erl_docgen/priv/xsl/db_html.xsl +++ b/lib/erl_docgen/priv/xsl/db_html.xsl @@ -868,13 +868,19 @@ - + - + - + + + + + + + @@ -1353,12 +1359,12 @@
    - +
    - - + +
    @@ -1386,6 +1392,35 @@
    + + + +
    +
    + + + +

    +

    Reference Manual

    +

    Version

    + + + + + +

    Table of Contents

    + +
      + + + + + +
    +
    +
    +
    + diff --git a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl index d562cfddcc..2c9aa2e3a3 100644 --- a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl +++ b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl @@ -1260,11 +1260,15 @@ get_text(#xmlElement{content=[E]}) -> %% text_and_name_only(Es) -> {N, Ts} text_and_a_name_only(Es) -> - [Name|_] = [Name || - #xmlElement{ - name = a, - attributes = [#xmlAttribute{name=name}]}=Name <- Es], - {Name#xmlElement{content = []}, text_only(Es)}. + erlang:display(Es), + case [Name || #xmlElement{ + name = a, + attributes = [#xmlAttribute{name=name}]}=Name <- Es] of + [Name|_] -> + {Name#xmlElement{content = []}, text_only(Es)}; + [] -> + {"", text_only(Es)} + end. %% text_only(Es) -> Ts %% Takes a list of xmlElement and xmlText and return a lists of xmlText. -- cgit v1.2.3 From cbef7064ee299f9463c2b6a0a274fe6603aedae9 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 29 Aug 2018 15:09:18 +0200 Subject: erts: Fix more internal docs xmllint --- lib/compiler/doc/src/Makefile | 2 +- lib/compiler/doc/src/internal.xml | 1 + lib/erl_docgen/priv/dtd/book.dtd | 3 ++- lib/erl_docgen/priv/dtd/common.dtd | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/compiler/doc/src/Makefile b/lib/compiler/doc/src/Makefile index 6ef4595ff3..2fb163b9e7 100644 --- a/lib/compiler/doc/src/Makefile +++ b/lib/compiler/doc/src/Makefile @@ -51,7 +51,7 @@ XML_FILES = \ $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES) XML_INTERNAL_FILES = \ - cerl.xml cerl_trees.xml + cerl.xml cerl_trees.xml cerl_clauses.xml # ---------------------------------------------------- diff --git a/lib/compiler/doc/src/internal.xml b/lib/compiler/doc/src/internal.xml index 833c788083..f24b363c1c 100644 --- a/lib/compiler/doc/src/internal.xml +++ b/lib/compiler/doc/src/internal.xml @@ -33,5 +33,6 @@ + diff --git a/lib/erl_docgen/priv/dtd/book.dtd b/lib/erl_docgen/priv/dtd/book.dtd index aa07d38658..326bf3369a 100644 --- a/lib/erl_docgen/priv/dtd/book.dtd +++ b/lib/erl_docgen/priv/dtd/book.dtd @@ -30,7 +30,7 @@ insidecover?, pagetext, preamble, - (applications|parts|headline|pagetext)+, + (applications|parts|internals|headline|pagetext)+, (listoffigures?, listoftables?, listofterms?, @@ -56,6 +56,7 @@ + diff --git a/lib/erl_docgen/priv/dtd/common.dtd b/lib/erl_docgen/priv/dtd/common.dtd index b1578ad9d4..0ccd52068b 100644 --- a/lib/erl_docgen/priv/dtd/common.dtd +++ b/lib/erl_docgen/priv/dtd/common.dtd @@ -25,7 +25,7 @@ + url|marker|anno|image" > -- cgit v1.2.3 From 07b9eacff8c65df4ac00a21010c748217c908eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 4 Apr 2019 12:29:56 +0200 Subject: cerl_clauses: Fix broken link --- lib/compiler/src/cerl_clauses.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/compiler/src/cerl_clauses.erl b/lib/compiler/src/cerl_clauses.erl index fa5104c01b..3fd7ddd181 100644 --- a/lib/compiler/src/cerl_clauses.erl +++ b/lib/compiler/src/cerl_clauses.erl @@ -14,8 +14,8 @@ %% @author Richard Carlsson %% @doc Utility functions for Core Erlang case/receive clauses. %% -%%

    Syntax trees are defined in the module cerl.

    +%%

    Syntax trees are defined in the module +%% cerl.

    %% %% @type cerl() = cerl:cerl() -- cgit v1.2.3