123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525 |
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <!-- This file is generated by Nim. -->
- <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en" data-theme="auto">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>packages/docutils/rstast</title>
- <!-- Google fonts -->
- <link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
- <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
- <!-- Favicon -->
- <link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
- <link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
- <!-- CSS -->
- <link rel="stylesheet" type="text/css" href="nimdoc.out.css?v=2.3.1">
- <!-- JS -->
- <script type="text/javascript" src="dochack.js?v=2.3.1"></script>
- </head>
- <body>
- <div class="document" id="documentId">
- <div class="container">
- <h1 class="title">packages/docutils/rstast</h1>
- <div class="row">
- <div class="three columns">
- <div class="theme-select-wrapper">
- <label for="theme-select">Theme: </label>
- <select id="theme-select" onchange="setTheme(this.value)">
- <option value="auto">🌗 Match OS</option>
- <option value="dark">🌑 Dark</option>
- <option value="light">🌕 Light</option>
- </select>
- </div>
- <div id="global-links">
- <ul class="simple-boot">
- <li><a href="manual.html">Manual</a></li>
- <li><a href="lib.html">Standard library</a></li>
- <li> <a id="indexLink" href="theindex.html">Index</a></li>
- <li><a href="compiler/theindex.html">Compiler docs</a></li>
- <li><a href="https://nim-lang.github.io/fusion/theindex.html">Fusion docs</a></li>
- <li><a href="https://nim-lang.github.io/Nim/">devel</a>, <a href="https://nim-lang.org/documentation.html">stable</a></li>
- </ul>
- </div>
- <div id="searchInputDiv">
- Search: <input type="search" id="searchInput"
- oninput="search()" />
- </div>
-
- <ul class="simple simple-toc" id="toc-list">
- <li>
- <a class="reference reference-toplevel" href="#6" id="56">Imports</a>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#FileIndex" title="FileIndex = distinct int32">FileIndex</a></li>
- <li><a class="reference" href="#PRstNode" title="PRstNode = ref RstNode">PRstNode</a></li>
- <li><a class="reference" href="#RstNode" title="RstNode {.acyclic, final.} = object
- case kind*: RstNodeKind ## the node's kind
- of rnLeaf, rnSmiley:
- text*: string ## string that is expected to be displayed
- of rnEnumList:
- labelFmt*: string ## label format like "(1)"
- of rnLineBlockItem:
- lineIndent*: string ## a few spaces or newline at the line beginning
- of rnAdmonition:
- adType*: string ## admonition type: "note", "caution", etc. This
- ## text will set the style and also be displayed
- of rnOverline, rnHeadline, rnMarkdownHeadline:
- level*: int ## level of headings starting from 1 (main
- ## chapter) to larger ones (minor sub-sections)
- ## level=0 means it's document title or subtitle
- of rnFootnote, rnCitation, rnOptionListItem:
- order*: int ## footnote order (for auto-symbol footnotes and
- ## auto-numbered ones without a label)
- of rnMarkdownBlockQuoteItem:
- quotationDepth*: int ## number of characters in line prefix
- of rnRstRef, rnPandocRef, rnSubstitutionReferences, rnInterpretedText,
- rnField, rnInlineCode, rnCodeBlock, rnFootnoteRef:
- info*: TLineInfo ## To have line/column info for warnings at
- ## nodes that are post-processed after parsing
- of rnNimdocRef:
- tooltip*: string
- of rnTable, rnGridTable, rnMarkdownTable:
- colCount*: int ## Number of (not-united) cells in the table
- of rnTableRow:
- endsHeader*: bool ## Is last row in the header of table?
- of rnTableHeaderCell, rnTableDataCell:
- span*: int ## Number of table columns that the cell occupies
- else:
- nil
- anchor*: string ## anchor, internal link target
- ## (aka HTML id tag, aka Latex label/hypertarget)
- sons*: RstNodeSeq ## the node's sons">RstNode</a></li>
- <li><a class="reference" href="#RstNodeKind" title="RstNodeKind = enum
- rnInner, rnHeadline, rnOverline, rnMarkdownHeadline, rnTransition,
- rnParagraph, rnBulletList, rnBulletItem, rnEnumList, rnEnumItem, rnDefList,
- rnMdDefList, rnDefItem, rnDefName, rnDefBody, rnFieldList, rnField,
- rnFieldName, rnFieldBody, rnOptionList, rnOptionListItem, rnOptionGroup,
- rnOption, rnOptionString, rnOptionArgument, rnDescription, rnLiteralBlock,
- rnMarkdownBlockQuote, rnMarkdownBlockQuoteItem, rnLineBlock, rnLineBlockItem,
- rnBlockQuote, rnTable, rnGridTable, rnMarkdownTable, rnTableRow,
- rnTableHeaderCell, rnTableDataCell, rnFootnote, rnCitation, rnFootnoteGroup,
- rnStandaloneHyperlink, rnHyperlink, rnRstRef, rnPandocRef, rnInternalRef,
- rnFootnoteRef, rnNimdocRef, rnDirective, rnDirArg, rnRaw, rnTitle, rnContents,
- rnImage, rnFigure, rnCodeBlock, rnAdmonition, rnRawHtml, rnRawLatex,
- rnContainer, rnIndex, rnSubstitutionDef, rnInlineCode, rnCodeFragment,
- rnUnknownRole, rnSub, rnSup, rnIdx, rnEmphasis, rnStrongEmphasis,
- rnTripleEmphasis, rnInterpretedText, rnInlineLiteral, rnInlineTarget,
- rnSubstitutionReferences, rnSmiley, rnDefaultRole, rnLeaf">RstNodeKind</a></li>
- <li><a class="reference" href="#RstNodeSeq" title="RstNodeSeq = seq[PRstNode]">RstNodeSeq</a></li>
- <li><a class="reference" href="#TLineInfo" title="TLineInfo = object
- line*: uint16
- col*: int16
- fileIndex*: FileIndex">TLineInfo</a></li>
- </ul>
- </details>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
- <ul class="simple simple-toc-section">
- <ul class="simple nested-toc-section">==
- <li><a class="reference" href="#%3D%3D%2CFileIndex%2CFileIndex" title="`==`(a, b: FileIndex): bool">`==`(a, b: FileIndex): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">add
- <li><a class="reference" href="#add%2CPRstNode%2CPRstNode" title="add(father, son: PRstNode)">add(father, son: PRstNode)</a></li>
- <li><a class="reference" href="#add%2CPRstNode%2Cstring" title="add(father: PRstNode; s: string)">add(father: PRstNode; s: string)</a></li>
- </ul>
- <ul class="simple nested-toc-section">addIfNotNil
- <li><a class="reference" href="#addIfNotNil%2CPRstNode%2CPRstNode" title="addIfNotNil(father, son: PRstNode)">addIfNotNil(father, son: PRstNode)</a></li>
- </ul>
- <ul class="simple nested-toc-section">lastSon
- <li><a class="reference" href="#lastSon%2CPRstNode" title="lastSon(n: PRstNode): PRstNode">lastSon(n: PRstNode): PRstNode</a></li>
- </ul>
- <ul class="simple nested-toc-section">len
- <li><a class="reference" href="#len%2CPRstNode" title="len(n: PRstNode): int">len(n: PRstNode): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">newRstLeaf
- <li><a class="reference" href="#newRstLeaf%2Cstring" title="newRstLeaf(s: string): PRstNode">newRstLeaf(s: string): PRstNode</a></li>
- </ul>
- <ul class="simple nested-toc-section">newRstNode
- <li><a class="reference" href="#newRstNode%2CRstNodeKind%2CTLineInfo%2Cseq%5BPRstNode%5D" title="newRstNode(kind: RstNodeKind; info: TLineInfo; sons: seq[PRstNode] = @[]): PRstNode">newRstNode(kind: RstNodeKind; info: TLineInfo; sons: seq[PRstNode] = @[]): PRstNode</a></li>
- <li><a class="reference" href="#newRstNode%2CRstNodeKind%2Cstring" title="newRstNode(kind: RstNodeKind; s: string): PRstNode">newRstNode(kind: RstNodeKind; s: string): PRstNode</a></li>
- <li><a class="reference" href="#newRstNode%2CRstNodeKind%2Cseq%5BPRstNode%5D%2Cstring" title="newRstNode(kind: RstNodeKind; sons: seq[PRstNode] = @[]; anchor = ""): PRstNode">newRstNode(kind: RstNodeKind; sons: seq[PRstNode] = @[]; anchor = ""): PRstNode</a></li>
- </ul>
- <ul class="simple nested-toc-section">renderRstToJson
- <li><a class="reference" href="#renderRstToJson%2CPRstNode" title="renderRstToJson(node: PRstNode): string">renderRstToJson(node: PRstNode): string</a></li>
- </ul>
- <ul class="simple nested-toc-section">renderRstToRst
- <li><a class="reference" href="#renderRstToRst%2CPRstNode%2Cstring" title="renderRstToRst(n: PRstNode; result: var string)">renderRstToRst(n: PRstNode; result: var string)</a></li>
- </ul>
- <ul class="simple nested-toc-section">renderRstToText
- <li><a class="reference" href="#renderRstToText%2CPRstNode" title="renderRstToText(node: PRstNode): string">renderRstToText(node: PRstNode): string</a></li>
- </ul>
- <ul class="simple nested-toc-section">treeRepr
- <li><a class="reference" href="#treeRepr%2CPRstNode%2Cint" title="treeRepr(node: PRstNode; indent = 0): string">treeRepr(node: PRstNode; indent = 0): string</a></li>
- </ul>
- </ul>
- </details>
- </li>
- </ul>
- </div>
- <div class="nine columns" id="content">
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L1" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L1" class="link-seesrc" target="_blank" >Edit</a>
- <div id="tocRoot"></div>
-
- <p class="module-desc">This module implements an AST for the <span id="restructuredtext_1">reStructuredText</span> parser.</p>
- <div class="section" id="6">
- <h1><a class="toc-backref" href="#6">Imports</a></h1>
- <dl class="item">
- <a class="reference external" href="strutils.html">strutils</a>, <a class="reference external" href="json.html">json</a>, <a class="reference external" href="assertions.html">assertions</a>
- </dl>
- </div>
- <div class="section" id="7">
- <h1><a class="toc-backref" href="#7">Types</a></h1>
- <dl class="item">
- <div id="FileIndex">
- <dt><pre><a href="rstast.html#FileIndex"><span class="Identifier">FileIndex</span></a> <span class="Other">=</span> <span class="Keyword">distinct</span> <a href="system.html#int32"><span class="Identifier">int32</span></a></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L88" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L88" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="PRstNode">
- <dt><pre><a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <a href="rstast.html#RstNode"><span class="Identifier">RstNode</span></a></pre></dt>
- <dd>
-
- an RST node
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L94" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L94" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="RstNode">
- <dt><pre><a href="rstast.html#RstNode"><span class="Identifier">RstNode</span></a> {.<span class="Identifier">acyclic</span><span class="Other">,</span> <span class="Identifier">final</span>.} <span class="Other">=</span> <span class="Keyword">object</span>
- <span class="Keyword">case</span> <span class="Identifier">kind</span><span class="Operator">*</span><span class="Other">:</span> <a href="rstast.html#RstNodeKind"><span class="Identifier">RstNodeKind</span></a> <span class="Comment">## the node's kind</span>
- <span class="Keyword">of</span> <span class="Identifier">rnLeaf</span><span class="Other">,</span> <span class="Identifier">rnSmiley</span><span class="Other">:</span>
- <span class="Identifier">text</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> <span class="Comment">## string that is expected to be displayed</span>
- <span class="Keyword">of</span> <span class="Identifier">rnEnumList</span><span class="Other">:</span>
- <span class="Identifier">labelFmt</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> <span class="Comment">## label format like "(1)"</span>
- <span class="Keyword">of</span> <span class="Identifier">rnLineBlockItem</span><span class="Other">:</span>
- <span class="Identifier">lineIndent</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> <span class="Comment">## a few spaces or newline at the line beginning</span>
- <span class="Keyword">of</span> <span class="Identifier">rnAdmonition</span><span class="Other">:</span>
- <span class="Identifier">adType</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> <span class="Comment">## admonition type: "note", "caution", etc. This</span>
- <span class="Comment">## text will set the style and also be displayed</span>
- <span class="Keyword">of</span> <span class="Identifier">rnOverline</span><span class="Other">,</span> <span class="Identifier">rnHeadline</span><span class="Other">,</span> <span class="Identifier">rnMarkdownHeadline</span><span class="Other">:</span>
- <span class="Identifier">level</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a> <span class="Comment">## level of headings starting from 1 (main</span>
- <span class="Comment">## chapter) to larger ones (minor sub-sections)</span>
- <span class="Comment">## level=0 means it's document title or subtitle</span>
- <span class="Keyword">of</span> <span class="Identifier">rnFootnote</span><span class="Other">,</span> <span class="Identifier">rnCitation</span><span class="Other">,</span> <span class="Identifier">rnOptionListItem</span><span class="Other">:</span>
- <span class="Identifier">order</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a> <span class="Comment">## footnote order (for auto-symbol footnotes and</span>
- <span class="Comment">## auto-numbered ones without a label)</span>
- <span class="Keyword">of</span> <span class="Identifier">rnMarkdownBlockQuoteItem</span><span class="Other">:</span>
- <span class="Identifier">quotationDepth</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a> <span class="Comment">## number of characters in line prefix</span>
- <span class="Keyword">of</span> <span class="Identifier">rnRstRef</span><span class="Other">,</span> <span class="Identifier">rnPandocRef</span><span class="Other">,</span> <span class="Identifier">rnSubstitutionReferences</span><span class="Other">,</span> <span class="Identifier">rnInterpretedText</span><span class="Other">,</span>
- <span class="Identifier">rnField</span><span class="Other">,</span> <span class="Identifier">rnInlineCode</span><span class="Other">,</span> <span class="Identifier">rnCodeBlock</span><span class="Other">,</span> <span class="Identifier">rnFootnoteRef</span><span class="Other">:</span>
- <span class="Identifier">info</span><span class="Operator">*</span><span class="Other">:</span> <a href="rstast.html#TLineInfo"><span class="Identifier">TLineInfo</span></a> <span class="Comment">## To have line/column info for warnings at</span>
- <span class="Comment">## nodes that are post-processed after parsing</span>
- <span class="Keyword">of</span> <span class="Identifier">rnNimdocRef</span><span class="Other">:</span>
- <span class="Identifier">tooltip</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a>
- <span class="Keyword">of</span> <span class="Identifier">rnTable</span><span class="Other">,</span> <span class="Identifier">rnGridTable</span><span class="Other">,</span> <span class="Identifier">rnMarkdownTable</span><span class="Other">:</span>
- <span class="Identifier">colCount</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a> <span class="Comment">## Number of (not-united) cells in the table</span>
- <span class="Keyword">of</span> <span class="Identifier">rnTableRow</span><span class="Other">:</span>
- <span class="Identifier">endsHeader</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> <span class="Comment">## Is last row in the header of table?</span>
- <span class="Keyword">of</span> <span class="Identifier">rnTableHeaderCell</span><span class="Other">,</span> <span class="Identifier">rnTableDataCell</span><span class="Other">:</span>
- <span class="Identifier">span</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a> <span class="Comment">## Number of table columns that the cell occupies</span>
- <span class="Keyword">else</span><span class="Other">:</span>
- <span class="Keyword">nil</span>
- <span class="Identifier">anchor</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> <span class="Comment">## anchor, internal link target</span>
- <span class="Comment">## (aka HTML id tag, aka Latex label/hypertarget)</span>
- <span class="Identifier">sons</span><span class="Operator">*</span><span class="Other">:</span> <a href="rstast.html#RstNodeSeq"><span class="Identifier">RstNodeSeq</span></a> <span class="Comment">## the node's sons</span></pre></dt>
- <dd>
-
- AST node (result of RST parsing)
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L96" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L96" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="RstNodeKind">
- <dt><pre><a href="rstast.html#RstNodeKind"><span class="Identifier">RstNodeKind</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
- <span class="Identifier">rnInner</span><span class="Other">,</span> <span class="Identifier">rnHeadline</span><span class="Other">,</span> <span class="Identifier">rnOverline</span><span class="Other">,</span> <span class="Identifier">rnMarkdownHeadline</span><span class="Other">,</span> <span class="Identifier">rnTransition</span><span class="Other">,</span>
- <span class="Identifier">rnParagraph</span><span class="Other">,</span> <span class="Identifier">rnBulletList</span><span class="Other">,</span> <span class="Identifier">rnBulletItem</span><span class="Other">,</span> <span class="Identifier">rnEnumList</span><span class="Other">,</span> <span class="Identifier">rnEnumItem</span><span class="Other">,</span> <span class="Identifier">rnDefList</span><span class="Other">,</span>
- <span class="Identifier">rnMdDefList</span><span class="Other">,</span> <span class="Identifier">rnDefItem</span><span class="Other">,</span> <span class="Identifier">rnDefName</span><span class="Other">,</span> <span class="Identifier">rnDefBody</span><span class="Other">,</span> <span class="Identifier">rnFieldList</span><span class="Other">,</span> <span class="Identifier">rnField</span><span class="Other">,</span>
- <span class="Identifier">rnFieldName</span><span class="Other">,</span> <span class="Identifier">rnFieldBody</span><span class="Other">,</span> <span class="Identifier">rnOptionList</span><span class="Other">,</span> <span class="Identifier">rnOptionListItem</span><span class="Other">,</span> <span class="Identifier">rnOptionGroup</span><span class="Other">,</span>
- <span class="Identifier">rnOption</span><span class="Other">,</span> <span class="Identifier">rnOptionString</span><span class="Other">,</span> <span class="Identifier">rnOptionArgument</span><span class="Other">,</span> <span class="Identifier">rnDescription</span><span class="Other">,</span> <span class="Identifier">rnLiteralBlock</span><span class="Other">,</span>
- <span class="Identifier">rnMarkdownBlockQuote</span><span class="Other">,</span> <span class="Identifier">rnMarkdownBlockQuoteItem</span><span class="Other">,</span> <span class="Identifier">rnLineBlock</span><span class="Other">,</span> <span class="Identifier">rnLineBlockItem</span><span class="Other">,</span>
- <span class="Identifier">rnBlockQuote</span><span class="Other">,</span> <span class="Identifier">rnTable</span><span class="Other">,</span> <span class="Identifier">rnGridTable</span><span class="Other">,</span> <span class="Identifier">rnMarkdownTable</span><span class="Other">,</span> <span class="Identifier">rnTableRow</span><span class="Other">,</span>
- <span class="Identifier">rnTableHeaderCell</span><span class="Other">,</span> <span class="Identifier">rnTableDataCell</span><span class="Other">,</span> <span class="Identifier">rnFootnote</span><span class="Other">,</span> <span class="Identifier">rnCitation</span><span class="Other">,</span> <span class="Identifier">rnFootnoteGroup</span><span class="Other">,</span>
- <span class="Identifier">rnStandaloneHyperlink</span><span class="Other">,</span> <span class="Identifier">rnHyperlink</span><span class="Other">,</span> <span class="Identifier">rnRstRef</span><span class="Other">,</span> <span class="Identifier">rnPandocRef</span><span class="Other">,</span> <span class="Identifier">rnInternalRef</span><span class="Other">,</span>
- <span class="Identifier">rnFootnoteRef</span><span class="Other">,</span> <span class="Identifier">rnNimdocRef</span><span class="Other">,</span> <span class="Identifier">rnDirective</span><span class="Other">,</span> <span class="Identifier">rnDirArg</span><span class="Other">,</span> <span class="Identifier">rnRaw</span><span class="Other">,</span> <span class="Identifier">rnTitle</span><span class="Other">,</span> <span class="Identifier">rnContents</span><span class="Other">,</span>
- <span class="Identifier">rnImage</span><span class="Other">,</span> <span class="Identifier">rnFigure</span><span class="Other">,</span> <span class="Identifier">rnCodeBlock</span><span class="Other">,</span> <span class="Identifier">rnAdmonition</span><span class="Other">,</span> <span class="Identifier">rnRawHtml</span><span class="Other">,</span> <span class="Identifier">rnRawLatex</span><span class="Other">,</span>
- <span class="Identifier">rnContainer</span><span class="Other">,</span> <span class="Identifier">rnIndex</span><span class="Other">,</span> <span class="Identifier">rnSubstitutionDef</span><span class="Other">,</span> <span class="Identifier">rnInlineCode</span><span class="Other">,</span> <span class="Identifier">rnCodeFragment</span><span class="Other">,</span>
- <span class="Identifier">rnUnknownRole</span><span class="Other">,</span> <span class="Identifier">rnSub</span><span class="Other">,</span> <span class="Identifier">rnSup</span><span class="Other">,</span> <span class="Identifier">rnIdx</span><span class="Other">,</span> <span class="Identifier">rnEmphasis</span><span class="Other">,</span> <span class="Identifier">rnStrongEmphasis</span><span class="Other">,</span>
- <span class="Identifier">rnTripleEmphasis</span><span class="Other">,</span> <span class="Identifier">rnInterpretedText</span><span class="Other">,</span> <span class="Identifier">rnInlineLiteral</span><span class="Other">,</span> <span class="Identifier">rnInlineTarget</span><span class="Other">,</span>
- <span class="Identifier">rnSubstitutionReferences</span><span class="Other">,</span> <span class="Identifier">rnSmiley</span><span class="Other">,</span> <span class="Identifier">rnDefaultRole</span><span class="Other">,</span> <span class="Identifier">rnLeaf</span></pre></dt>
- <dd>
-
- the possible node kinds of an PRstNode
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L19" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L19" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="RstNodeSeq">
- <dt><pre><a href="rstast.html#RstNodeSeq"><span class="Identifier">RstNodeSeq</span></a> <span class="Other">=</span> <a href="system.html#seq"><span class="Identifier">seq</span></a><span class="Other">[</span><a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">]</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L95" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L95" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="TLineInfo">
- <dt><pre><a href="rstast.html#TLineInfo"><span class="Identifier">TLineInfo</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
- <span class="Identifier">line</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#uint16"><span class="Identifier">uint16</span></a>
- <span class="Identifier">col</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#int16"><span class="Identifier">int16</span></a>
- <span class="Identifier">fileIndex</span><span class="Operator">*</span><span class="Other">:</span> <a href="rstast.html#FileIndex"><span class="Identifier">FileIndex</span></a></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L89" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L89" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </dl>
- </div>
- <div class="section" id="12">
- <h1><a class="toc-backref" href="#12">Procs</a></h1>
- <dl class="item">
- <div id="==-procs-all">
- <div id="==,FileIndex,FileIndex">
- <dt><pre><span class="Keyword">proc</span> <a href="#%3D%3D%2CFileIndex%2CFileIndex"><span class="Identifier">`==`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="rstast.html#FileIndex"><span class="Identifier">FileIndex</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span class="Identifier">borrow</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L134" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L134" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="add-procs-all">
- <div id="add,PRstNode,PRstNode">
- <dt><pre><span class="Keyword">proc</span> <a href="#add%2CPRstNode%2CPRstNode"><span class="Identifier">add</span></a><span class="Other">(</span><span class="Identifier">father</span><span class="Other">,</span> <span class="Identifier">son</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L160" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L160" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="add,PRstNode,string">
- <dt><pre><span class="Keyword">proc</span> <a href="#add%2CPRstNode%2Cstring"><span class="Identifier">add</span></a><span class="Other">(</span><span class="Identifier">father</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">;</span> <span class="Identifier">s</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L163" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L163" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="addIfNotNil-procs-all">
- <div id="addIfNotNil,PRstNode,PRstNode">
- <dt><pre><span class="Keyword">proc</span> <a href="#addIfNotNil%2CPRstNode%2CPRstNode"><span class="Identifier">addIfNotNil</span></a><span class="Other">(</span><span class="Identifier">father</span><span class="Other">,</span> <span class="Identifier">son</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L166" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L166" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="lastSon-procs-all">
- <div id="lastSon,PRstNode">
- <dt><pre><span class="Keyword">proc</span> <a href="#lastSon%2CPRstNode"><span class="Identifier">lastSon</span></a><span class="Other">(</span><span class="Identifier">n</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">)</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L157" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L157" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="len-procs-all">
- <div id="len,PRstNode">
- <dt><pre><span class="Keyword">proc</span> <a href="#len%2CPRstNode"><span class="Identifier">len</span></a><span class="Other">(</span><span class="Identifier">n</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L136" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L136" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="newRstLeaf-procs-all">
- <div id="newRstLeaf,string">
- <dt><pre><span class="Keyword">proc</span> <a href="#newRstLeaf%2Cstring"><span class="Identifier">newRstLeaf</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L153" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L153" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="newRstNode-procs-all">
- <div id="newRstNode,RstNodeKind,TLineInfo,seq[PRstNode]">
- <dt><pre><span class="Keyword">proc</span> <a href="#newRstNode%2CRstNodeKind%2CTLineInfo%2Cseq%5BPRstNode%5D"><span class="Identifier">newRstNode</span></a><span class="Other">(</span><span class="Identifier">kind</span><span class="Other">:</span> <a href="rstast.html#RstNodeKind"><span class="Identifier">RstNodeKind</span></a><span class="Other">;</span> <span class="Identifier">info</span><span class="Other">:</span> <a href="rstast.html#TLineInfo"><span class="Identifier">TLineInfo</span></a><span class="Other">;</span> <span class="Identifier">sons</span><span class="Other">:</span> <a href="system.html#seq"><span class="Identifier">seq</span></a><span class="Other">[</span><a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">]</span> <span class="Other">=</span> <span class="Operator">@</span><span class="Other">[</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a> {.
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L143" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L143" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="newRstNode,RstNodeKind,string">
- <dt><pre><span class="Keyword">proc</span> <a href="#newRstNode%2CRstNodeKind%2Cstring"><span class="Identifier">newRstNode</span></a><span class="Other">(</span><span class="Identifier">kind</span><span class="Other">:</span> <a href="rstast.html#RstNodeKind"><span class="Identifier">RstNodeKind</span></a><span class="Other">;</span> <span class="Identifier">s</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">deprecated</span><span class="Other">,</span>
- <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- <div class="deprecation-message">
- <b>Deprecated</b>
- </div>
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L148" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L148" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="newRstNode,RstNodeKind,seq[PRstNode],string">
- <dt><pre><span class="Keyword">proc</span> <a href="#newRstNode%2CRstNodeKind%2Cseq%5BPRstNode%5D%2Cstring"><span class="Identifier">newRstNode</span></a><span class="Other">(</span><span class="Identifier">kind</span><span class="Other">:</span> <a href="rstast.html#RstNodeKind"><span class="Identifier">RstNodeKind</span></a><span class="Other">;</span> <span class="Identifier">sons</span><span class="Other">:</span> <a href="system.html#seq"><span class="Identifier">seq</span></a><span class="Other">[</span><a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">]</span> <span class="Other">=</span> <span class="Operator">@</span><span class="Other">[</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">anchor</span> <span class="Other">=</span> <span class="StringLit">""</span><span class="Other">)</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a> {.
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L139" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L139" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="renderRstToJson-procs-all">
- <div id="renderRstToJson,PRstNode">
- <dt><pre><span class="Keyword">proc</span> <a href="#renderRstToJson%2CPRstNode"><span class="Identifier">renderRstToJson</span></a><span class="Other">(</span><span class="Identifier">node</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- Writes the given RST node as JSON that is in the form<pre>{
- "kind":string node.kind,
- "text":optional string node.text,
- "level":optional int node.level,
- "sons":optional node array
- }</pre>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L378" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L378" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="renderRstToRst-procs-all">
- <div id="renderRstToRst,PRstNode,string">
- <dt><pre><span class="Keyword">proc</span> <a href="#renderRstToRst%2CPRstNode%2Cstring"><span class="Identifier">renderRstToRst</span></a><span class="Other">(</span><span class="Identifier">n</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">;</span> <span class="Identifier">result</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- renders <tt class="docutils literal"><span class="pre"><span class="Identifier">n</span></span></tt> into its string representation and appends to <tt class="docutils literal"><span class="pre"><span class="Identifier">result</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L359" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L359" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="renderRstToText-procs-all">
- <div id="renderRstToText,PRstNode">
- <dt><pre><span class="Keyword">proc</span> <a href="#renderRstToText%2CPRstNode"><span class="Identifier">renderRstToText</span></a><span class="Other">(</span><span class="Identifier">node</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- minimal text representation of markup node
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L389" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L389" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="treeRepr-procs-all">
- <div id="treeRepr,PRstNode,int">
- <dt><pre><span class="Keyword">proc</span> <a href="#treeRepr%2CPRstNode%2Cint"><span class="Identifier">treeRepr</span></a><span class="Other">(</span><span class="Identifier">node</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">;</span> <span class="Identifier">indent</span> <span class="Other">=</span> <span class="DecNumber">0</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- Writes the parsed RST <tt class="docutils literal"><span class="pre"><span class="Identifier">node</span></span></tt> into an AST tree with compact string representation in the format (one line per every sub-node): <tt class="docutils literal"><span class="pre">indent - kind - [text|level|order|adType] - anchor (if non-zero)</span></tt> (suitable for debugging of RST parsing).
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rstast.nim#L405" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rstast.nim#L405" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- </dl>
- </div>
- </div>
- </div>
- <div class="twelve-columns footer">
- <span class="nim-sprite"></span>
- <br>
- <small style="color: var(--hint);">Made with Nim. Generated: 2025-03-15 14:13:38 UTC</small>
- </div>
- </div>
- </div>
- <script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
-
- </body>
- </html>
|