Skip to content

Commit

Permalink
Merge pull request #29 from 422404/feature/user-defined-functions
Browse files Browse the repository at this point in the history
Feature/user defined functions
  • Loading branch information
422404 committed Mar 26, 2022
2 parents 499a1d8 + a22d75c commit 87ef8d0
Show file tree
Hide file tree
Showing 94 changed files with 2,458 additions and 4,301 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ dependencies {
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}

test {
Expand Down
Binary file modified docs/_build/doctrees/building.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/examples.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/executing.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/installation.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/syntax.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: da44584c41c34d65b0a6682698f24dff
config: 2e78f9877770a1a550d7d36372897933
tags: 645f666f9bcd5a90fca523b33c5a78b7
32 changes: 32 additions & 0 deletions docs/_build/html/_sources/syntax.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,38 @@ Prints::

hello42

Defining functions
------------------

Functions can be defined following this pattern::

fun <function name> (<arg 1>, ..., <arg N>) = <expression> | <statements>

Example:

.. code-block::
fun mul(x, y) = x * y;
fun print(s) = {
display s
};
fun spawnActor(x) = {
a = create Actor(x);
return a
}
Functions can be called as part of expressions or with the ``call`` statement::

fun print(value, printer) = send [value] to printer;

Printer () [value] = display value;
p = create Printer ();

v = F(x, y) * H(y) + x;
call print(v, p)

Actor behavior definition
-------------------------

Expand Down
8 changes: 5 additions & 3 deletions docs/_build/html/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down Expand Up @@ -731,8 +731,9 @@ dl.glossary dt {

.classifier:before {
font-style: normal;
margin: 0.5em;
margin: 0 0.5em;
content: ":";
display: inline-block;
}

abbr, acronym {
Expand All @@ -756,6 +757,7 @@ span.pre {
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
white-space: nowrap;
}

div[class*="highlight-"] {
Expand Down Expand Up @@ -819,7 +821,7 @@ div.code-block-caption code {

table.highlighttable td.linenos,
span.linenos,
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
-webkit-user-select: text; /* Safari fallback only */
-webkit-user-select: none; /* Chrome/Safari */
Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/_static/css/theme.css

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion docs/_build/html/_static/doctools.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down Expand Up @@ -264,6 +264,9 @@ var Documentation = {
hideSearchWords : function() {
$('#searchbox .highlight-link').fadeOut(300);
$('span.highlighted').removeClass('highlighted');
var url = new URL(window.location);
url.searchParams.delete('highlight');
window.history.replaceState({}, '', url);
},

/**
Expand Down Expand Up @@ -301,12 +304,14 @@ var Documentation = {
window.location.href = prevHref;
return false;
}
break;
case 39: // right
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
}
break;
}
}
});
Expand Down
Binary file removed docs/_build/html/_static/fonts/Inconsolata-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file removed docs/_build/html/_static/fonts/Inconsolata.ttf
Binary file not shown.
Binary file removed docs/_build/html/_static/fonts/Lato-Bold.ttf
Binary file not shown.
Binary file removed docs/_build/html/_static/fonts/Lato-Regular.ttf
Binary file not shown.
Binary file removed docs/_build/html/_static/fonts/Lato/lato-bold.eot
Binary file not shown.
Binary file removed docs/_build/html/_static/fonts/Lato/lato-bold.ttf
Binary file not shown.
Binary file removed docs/_build/html/_static/fonts/Lato/lato-bold.woff
Binary file not shown.
Binary file removed docs/_build/html/_static/fonts/Lato/lato-bold.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/_build/html/_static/fonts/Lato/lato-italic.eot
Binary file not shown.
Binary file removed docs/_build/html/_static/fonts/Lato/lato-italic.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/_build/html/_static/fonts/RobotoSlab-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2,671 changes: 0 additions & 2,671 deletions docs/_build/html/_static/fonts/fontawesome-webfont.svg

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 0 additions & 4 deletions docs/_build/html/_static/js/modernizr.min.js

This file was deleted.

0 comments on commit 87ef8d0

Please sign in to comment.