Documentation Index
ASnake Documentation
Getting Started:
Syntax order:
This is the recommended order to learn ASnake's syntax. Do keep in mind some pages may reference future pages and concepts. This is documentation, not necessarily a tutorial. Though examples of usage are provided, with their expected results.
- Assignment
- Typing
- F-Strings
- Constants
- Operators
- Conditionals
- Function Defines
- Function Line Wrap
- Default Expression
- Pipes
- Indentation
- Loops
- Number Range
- Increments
- Any/All Of
- Imports
- Metas
- PyPass
Syntax Highlighting:
Syntax highlighting is a feature in many editors for distinguishing pieces of code to make it easier to read. Most editors already support highlighting Python's syntax, so usually you can set it to use Python's highlighting on ASnake, and it will work good enough. However, some will not, or you may desire support for ASnake specific syntax.
The below list will provide information on IDE or editor support status.
Key:
- π = Fully supported by default.
- βοΈ = Supported via custom syntax. Download link may be provided.
- π = Supported when using Python as a syntax setting. Navigation to setting may be provided.
- β = Unsupported and/or broken.
Command line editors:
- nano
- βοΈ nanorc fileβ Install script (user installation for Linux) below: β¬οΈ
mkdir -p ~/.nano
curl -o ~/.nano/asnake.nanorc "https://asnake.org/syntax-highlight/asnake.nanorc"
echo "include ~/.nano/asnake.nanorc" >> ~/.nanorc
GUI Editors:
- Mousepad
- π Document β Filetype β Script β Python
- Notepad++
- βοΈ UDL XML fileβ
- Language β User Defined Language β Import β asnake.xml
- π Language β P β Python
- βοΈ UDL XML fileβ
- Notepadqq
- π Language β P β Python
- Kate
- π Tools β Highlighting β Scripts β Python
IDEs:
Some IDEs may be able to run ASnake in the future by making a wrapper around an actual interpreter, and having the ASnake compiler pass through the code first before the interpreter sees it. For now though, most IDEs will not support running ASnake.
- PyCharm β
- Thonny
- β/π Syntax highlighting works when loading
.asnake
file as a.py
file. This is not recommended because the ASnake compiler is not usable by Thonny.
- β/π Syntax highlighting works when loading
Other:
- Discord code block
- π Use ```py when starting a code block.