Add documentation page for the compiler
This commit is contained in:
Родитель
15210207ea
Коммит
df910f48d3
|
@ -0,0 +1,2 @@
|
|||
<style type="text/css"> table.cmdargs td { max-width: 420px; } </style>
|
||||
|
|
@ -26,7 +26,7 @@ $endif$
|
|||
}
|
||||
td.lineNumbers { width: 40px; }
|
||||
div#all {
|
||||
width: 1120px;
|
||||
max-width: 1120px;
|
||||
background-color: #ffffff;
|
||||
margin: 0 auto;
|
||||
padding: 25px;
|
||||
|
@ -50,17 +50,21 @@ $endif$
|
|||
border-bottom: 1px solid black;
|
||||
}
|
||||
|
||||
div.sourceCode {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
#toc {
|
||||
width: 300px;
|
||||
position:fixed;
|
||||
overflow: auto;
|
||||
height: 100%;
|
||||
height: 95%;
|
||||
}
|
||||
|
||||
#main {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 800px;
|
||||
margin-left: 320px;
|
||||
margin-rigth: auto;
|
||||
max-width: 800px;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
|
@ -74,6 +78,15 @@ $endif$
|
|||
a:link {
|
||||
color: #36c;
|
||||
}
|
||||
@media screen and (max-width: 979px){
|
||||
#main {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
#toc {
|
||||
left: -300px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
$for(css)$
|
||||
<link rel="stylesheet" href="$css$" $if(html5)$$else$type="text/css" $endif$/>
|
||||
|
|
|
@ -54,13 +54,26 @@ endfunction()
|
|||
find_haskell_program (pandoc)
|
||||
|
||||
if (Haskell_PANDOC_EXECUTABLE)
|
||||
add_custom_target (documentation)
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/html/manual/gbc.html"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy .pandoc/templates/cmdargs.html "${CMAKE_CURRENT_BINARY_DIR}/html/manual/gbc.html"
|
||||
COMMAND ${GBC_EXECUTABLE} --help=html >> "${CMAKE_CURRENT_BINARY_DIR}/html/manual/gbc.html"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS .pandoc/templates/cmdargs.html ${GBC_EXECUTABLE})
|
||||
|
||||
add_custom_target (documentation
|
||||
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/html/manual/gbc.html")
|
||||
|
||||
add_pandoc_markdown (src/bond_py.md src/bond_cpp.md
|
||||
CODE "cpp,numberLines"
|
||||
OPTIONS --self-contained --table-of-contents
|
||||
OUTPUT_DIR manual)
|
||||
|
||||
add_pandoc_markdown (src/compiler.md
|
||||
CODE "javascript"
|
||||
OPTIONS --self-contained --table-of-contents
|
||||
OUTPUT_DIR manual)
|
||||
|
||||
add_pandoc_markdown (src/bond_cs.md
|
||||
CODE "cs,numberLines"
|
||||
OPTIONS --self-contained --table-of-contents
|
||||
|
|
|
@ -32,7 +32,7 @@ In Bond data schemas are defined using idl-like [syntax](#idl-syntax):
|
|||
}
|
||||
|
||||
In order to use the schema in a C++ program, it needs to be compiled using the
|
||||
Bond compiler [`gbc`](gbc.html). This step is sometimes also referred to as
|
||||
Bond compiler [`gbc`](compiler.html). This step is sometimes also referred to as
|
||||
code generation (or codegen) because the compilation generates C++ code
|
||||
corresponding to the schema definition.
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ Code generation
|
|||
===============
|
||||
|
||||
In order to use a Bond schema in a C# program, it needs to be compiled using
|
||||
the Bond compiler [`gbc`](gbc.html). The compiler generates C# classes that
|
||||
the Bond compiler [`gbc`](compiler.html). The compiler generates C# classes that
|
||||
represent the schema. By default schema fields are represented by public
|
||||
auto-properties initialized in the default constructor. Code generation can be
|
||||
customized by passing one or more of the following command line options to
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Command line options
|
||||
====================
|
||||
|
||||
<div class="sourceCode"><object width="702" height="1000" data="gbc.html"/></div>
|
||||
|
Загрузка…
Ссылка в новой задаче