Uxntal Linter, written in Tal
Go to file
Devine Lu Linvega f36764bf90 Fixed CI 2024-07-22 15:59:16 -07:00
etc Fixed issue with afnd 2024-06-17 20:08:18 -08:00
src Added recipes 2024-07-15 17:13:52 -07:00
.build.yml Fixed CI 2024-07-22 15:59:16 -07:00
.gitignore gitignore 2023-12-18 15:10:39 -08:00
LICENSE Init 2021-08-22 18:09:27 -07:00
README.md Added badge 2022-11-11 15:44:50 -08:00
makefile Removed broken rule 2024-01-29 14:41:04 -08:00

README.md

Uxnlin

A linter for the Uxntal programming language, written in Uxntal.

Build

You must have the Uxn assembler and emulator.

uxnasm src/uxnlin.tal bin/uxnlin.rom

Usage

The following command will read a tal file and raise warnings if optimizations can be found.

uxncli bin/uxnlin.rom path/to/source.tal

If do not wish to assemble it yourself, you can download uxnlin.rom.

builds.sr.ht status

Manual

  • Skip sections of code by wrapping them inside square brakets.
#01 #02 ADD ( will throw a warning )
[ #0001 #0002 ADD2 ] ( will not throw a warning )

Includes

When Uxnlin encounters an include rune, such as ~src/include.tal, the parser will move on to evaluating the file without coming back. This is designed to follow Drifblim's include chain pattern.

Warnings

  • Redundance: Opcode effects cancel each other.
  • Static-Arithmetic: Arithmetic opcode on two static literals.
  • Static-Duplicate: Two identical static literals.
  • Unkept: Opcode should use non-destructive keep mode.
  • Unsafe: Bitwise opcode used in relative jump.
  • Unstashed: literal was created on the wrong stack.

Extras