Skip to content

Commit

Permalink
docs: update docs and add html lint
Browse files Browse the repository at this point in the history
- linter should ensure our html is compliant

Signed-off-by: Alexander Hansen <[email protected]>
  • Loading branch information
pointbazaar committed Sep 14, 2024
1 parent 121c4ee commit f43f3fc
Show file tree
Hide file tree
Showing 21 changed files with 180 additions and 228 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/html-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: W3CValidation

on:
push:
paths:
- 'docs/**'
pull_request:
paths:
- 'docs/**'

permissions:
contents: read

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: HTML5Validator
uses: Cyb3r-Jak3/html5validator-action
with:
root: docs/
blacklist: invalid
25 changes: 11 additions & 14 deletions docs/html/annotations.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,34 @@
</head>
<body>
<div class="container-xl">

<div class="row nav-bg">
<div class="col">
<a href="../index.html"><h1>Home</h1></a>
</div>
<div class="col-2">
<a href="stdlib.html"><h1>next</h1></a>
</div>
</div>

<h1>Annotations</h1>

<p>
ESPL1000 currently supports a few simple Annotations
ESPL1000 currently supports a few simple Annotations
which allow for additional Errors, Warnings and Notes
to be issued
without adding syntax bloat.<br>
<br>
New Annotations can easily be added and existing

New Annotations can easily be added and existing
ones can be disabled with minimal code changes in the
transpiler.
</p>

<h3>Supported Annotations</h3>

<ul>
<li><strong>@halts</strong> - issues warning if subroutine could not be proven to terminate</li>
<li><strong>@deprecated</strong> - issues warning for calls to this subroutine</li>
<li>
<strong>@private</strong>
<strong>@private</strong>
<ul>
<li><i>subroutines</i>: issues warning if the subroutine is called directly outside it's own namespace</li>
<li><i>structs</i>: issues warning if the struct is referenced directly outside it's own namespace</li>
Expand All @@ -52,15 +49,15 @@ <h3>Supported Annotations</h3>
</ul>

<h3>Example</h3>

<pre><code>@private
struct A {
@private
@private
uint32 b;

uint32 a;
}

fn main () ~> int {
subr1();
subr2();
Expand Down
11 changes: 4 additions & 7 deletions docs/html/architecture.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,22 @@
<head>
<meta charset="utf-8">
<title>Architecture</title>

<link rel="icon" href="../img/favicon.ico">

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
<link rel="stylesheet" href="../css/style.css">

</head>

<body>

<div class="container-xl">

<div class="row nav-bg">
<div class="col">
<a href="../index.html"><h1>Home</h1></a>
</div>
<div class="col-2">
<a href="project-goals.html"><h1>next</h1></a>
</div>
</div>

<h1 class="mb-3">Architecture</h1>
Expand Down
7 changes: 2 additions & 5 deletions docs/html/avr-backend.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@
</head>
<body>
<div class="container-xl">

<div class="row nav-bg">
<div class="col">
<a href="../index.html"><h1>Home</h1></a>
</div>
<div class="col-2">
<a href="architecture.html"><h1>next</h1></a>
</div>
</div>

<h2 class="p-1 m-2" style="color:red; background-color: black;">Work In Progress</h2>
Expand Down Expand Up @@ -48,7 +45,7 @@ <h1 class="m-3">AVR Backend</h1>
</p>

<a href="ww1.microchip.com/downloads/en/devicedoc/atmel-0856-avr-instruction-set-manual.pdf">AVR Instruction Set Manual (PDF)</a>

<a href="https://en.wikipedia.org/wiki/Atmel_AVR_instruction_set">AVR Instruction Set (Wikipedia)</a>
<br>
<p></p>
Expand Down
16 changes: 6 additions & 10 deletions docs/html/calling-convention.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,26 @@
</head>
<body>
<div class="container-xl">

<div class="row nav-bg">
<div class="col">
<a href="../index.html"><h1>Home</h1></a>
</div>
<div class="col-2">
<a href="primitives.html"><h1>next</h1></a>
</div>
</div>


<h1>Calling Convention</h1>

<h2>The Caller</h2>
<p>
The Caller pushes the Arguments on the Stack in Order.
</p>

<h2>The Callee</h2>
<p>
The Callee then must pop them into registers in reverse Order.
That happens before anything else in the Callee.
</p>

<h2>Example - IR</h2>
<pre>
TAC_CONST_VALUE t1 = 19
Expand All @@ -49,8 +45,8 @@ <h2>Example - IR</h2>
----------------
TAC_CONST_VALUE t0 = 0
TAC_RETURN t0
</pre>
</pre>

<h2>Example - AVR Assembler</h2>
<pre>
main:
Expand All @@ -67,7 +63,7 @@ <h2>Example - AVR Assembler</h2>
pop r18
ret
</pre>

</div>

</body>
Expand Down
5 changes: 1 addition & 4 deletions docs/html/contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@
</head>
<body>
<div class="container-xl">

<div class="row nav-bg">
<div class="col">
<a href="../index.html"><h1>Home</h1></a>
</div>
<div class="col-2">
<a href="flags.html"><h1>next</h1></a>
</div>
</div>

<h1>Contributing</h1>
Expand Down
23 changes: 10 additions & 13 deletions docs/html/controlflow.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,30 @@
<meta name="author" content="ESPL1000">

<link rel="icon" href="../img/favicon.ico">

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
<link rel="stylesheet" href="../css/style.css">
</head>

<body>

<div class="container-xl">

<div class="row nav-bg">
<div class="col">
<a href="../index.html"><h1>Home</h1></a>
</div>
<div class="col-2">
<a href="calling-convention.html"><h1>next</h1></a>
</div>
</div>

<h1 class = "mb-3 mt-3">Flow of Control Statements</h1>



<div class="col">
<h3> if / else </h3>
<pre><code>fn main () ~&gt; int {
if 0 &lt; 3 { return 8; }

if 0 &lt; 3 { return 8; }
else { return 0; }
return 0;
}
Expand All @@ -45,9 +42,9 @@ <h3> if / else </h3>
<div class="col">
<h3> for, break, continue </h3>
<pre><code>fn main () ~&gt; int {

for x in 0 .. 3 {

if x == 1 { continue; }
if x == 2 { break; }
}
Expand All @@ -59,9 +56,9 @@ <h3> for, break, continue </h3>
<div class="col">
<h3> while </h3>
<pre><code>fn main () ~&gt; int {
while 2 &lt; 3 {
printf("hello \n");

while 2 &lt; 3 {
printf("hello \n");
}
return 0;
}
Expand Down
5 changes: 1 addition & 4 deletions docs/html/editor-support.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@
</head>
<body>
<div class="container-xl">

<div class="row nav-bg">
<div class="col">
<a href="../index.html"><h1>Home</h1></a>
</div>
<div class="col-2">
<a href="contributing.html"><h1>next</h1></a>
</div>
</div>

<h1>Editor Support</h1>
Expand Down
7 changes: 2 additions & 5 deletions docs/html/flags.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@
</head>
<body>
<div class="container-xl">

<div class="row nav-bg">
<div class="col"><a href="../index.html"><h1>Home</h1></a></div>
<div class="col-2">
<a href="grammar.html"><h1>next</h1></a>
</div>
</div>

<h1>Flags</h1>


<ul>
<li>-help<br>
shows a short Explanation of the available Flags
Expand Down
Loading

0 comments on commit f43f3fc

Please sign in to comment.