Skip to content

Commit

Permalink
improved a little the python parser
Browse files Browse the repository at this point in the history
  • Loading branch information
clsource committed Nov 2, 2024
1 parent 20ef548 commit 076e97d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion 0.4/docs/src/wren.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- file: wren.odin -->
<!-- documentation automatically generated using domepunk/tools/doc -->

## Wren API Bindings
# Wren API Bindings

Wren is a small, fast, class-based concurrent scripting language

Expand Down
21 changes: 11 additions & 10 deletions 0.4/tools/wrendoc/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,17 @@ def makeMarkdownFile(comments, file):
line = line.strip()

# Headers
#classKeyword = ":: proc"

# if line.startswith(f"{classKeyword} "):
# title = f"{classKeyword.title()}" + line[len(classKeyword):]
# markdown += f"\n---\n## {getHref(title, llineno, url)}\n"
# apiHeaderPresent = False
# else:
if not apiHeaderPresent:
markdown += "\n## API\n"
apiHeaderPresent = True

classKeyword = "package"

if line.startswith(f"{classKeyword} "):
title = f"{classKeyword.title()}" + line[len(classKeyword):]
markdown += f"\n---\n## {getHref(title, llineno, url)}\n"
apiHeaderPresent = False
else:
if not apiHeaderPresent:
markdown += "\n## API\n"
apiHeaderPresent = True

markdown += f"\n### {getHref(line, llineno, url)}\n"

Expand Down
2 changes: 1 addition & 1 deletion 0.4/wren.odin
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package wren_0_4

/** doc-header
## Wren API Bindings
# Wren API Bindings
Wren is a small, fast, class-based concurrent scripting language
Expand Down
2 changes: 1 addition & 1 deletion docs/0.4/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ <h1 class="menu-title">Wren bindings for Odin</h1>
<main>
<!-- file: wren.odin -->
<!-- documentation automatically generated using domepunk/tools/doc -->
<h2 id="wren-api-bindings"><a class="header" href="#wren-api-bindings">Wren API Bindings</a></h2>
<h1 id="wren-api-bindings"><a class="header" href="#wren-api-bindings">Wren API Bindings</a></h1>
<p>Wren is a small, fast, class-based concurrent scripting language</p>
<p>Think Smalltalk in a Lua-sized package with a dash of Erlang and wrapped up in
a familiar, modern syntax.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/0.4/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ <h1 class="menu-title">Wren bindings for Odin</h1>
<main>
<!-- file: wren.odin -->
<!-- documentation automatically generated using domepunk/tools/doc -->
<h2 id="wren-api-bindings"><a class="header" href="#wren-api-bindings">Wren API Bindings</a></h2>
<h1 id="wren-api-bindings"><a class="header" href="#wren-api-bindings">Wren API Bindings</a></h1>
<p>Wren is a small, fast, class-based concurrent scripting language</p>
<p>Think Smalltalk in a Lua-sized package with a dash of Erlang and wrapped up in
a familiar, modern syntax.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/0.4/wren.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ <h1 class="menu-title">Wren bindings for Odin</h1>
<main>
<!-- file: wren.odin -->
<!-- documentation automatically generated using domepunk/tools/doc -->
<h2 id="wren-api-bindings"><a class="header" href="#wren-api-bindings">Wren API Bindings</a></h2>
<h1 id="wren-api-bindings"><a class="header" href="#wren-api-bindings">Wren API Bindings</a></h1>
<p>Wren is a small, fast, class-based concurrent scripting language</p>
<p>Think Smalltalk in a Lua-sized package with a dash of Erlang and wrapped up in
a familiar, modern syntax.</p>
Expand Down

0 comments on commit 076e97d

Please sign in to comment.