https://github.com/kenny2github/py-arrow-lang
An implementation of Arrow (https://github.com/jacob-g/arrow-lang) in Python.
https://github.com/kenny2github/py-arrow-lang
Last synced: about 1 year ago
JSON representation
An implementation of Arrow (https://github.com/jacob-g/arrow-lang) in Python.
- Host: GitHub
- URL: https://github.com/kenny2github/py-arrow-lang
- Owner: Kenny2github
- License: mit
- Created: 2020-06-16T08:21:26.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-22T10:25:06.000Z (almost 6 years ago)
- Last Synced: 2025-03-14T19:53:02.629Z (about 1 year ago)
- Language: Python
- Homepage: https://pypi.org/project/py-arrow-lang/
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
py-arrow-lang
-------------
An implementation of `Arrow `_ in Python.
Running Arrow code
==================
.. code-block:: text
$ arrow --help
usage: arrow [-h] [file]
positional arguments:
file A file to run. Use - for stdin without prompt.
optional arguments:
-h, --help show this help message and exit
Example Arrow program
=====================
.. code-block:: text
function
/--> int factorial(int n)
| require not (n < 0)
| int return
| /--< n != 0
| | return = 1
| \-->
| /--< n == 0
| | return = n * factorial(n - 1)
| \-->
^ return
main
int n
print "Enter number:"
n = input int
print "Factorial of", n, "is", factorial(n)
Which outputs:
.. code-block:: text
Enter number:
5
Factorial of 5 is 120