PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Written By

Hinterpret

Hinterpret

So I've created a "compiled" language (Halppp) so I wanted to see if I could use it to create an interpreted language.

Using the previous knowledge of building the compiler, for the language I'm now building the interpreter in, helped a lot since I know what parts I needed to parse the input. Since the compiler is self compiled it's also easy to reuse design parts from it.

I started Saturday and got it in a working state Today(Sunday). Still a lot of features missing but usable for something minor.

let a = "Hello"
let b = "World"
b = b + "!"
print RED + a + " " + b + "!" + RESET

filer "ver.txt" version
tonum version
print GREEN + "Version: " + RESET + version 
print "Update version? " + YELLOW + "(y/n)" + RESET
printnobr RED + "> " + RESET
read input
if input == "y"
    | version = version + 0.1
    | print GREEN + "Updated version to: " + RESET + version
    | filew "ver.txt" version

exit

hinterpret.gif

Features

  • assign variables
  • concat strings
  • mathematical operation
  • conditional branching
  • colored printing
  • reassign variables
  • read/write files
  • syscalls
  • functions
  • loops
  • lists
  • input arguments

The syntax design

I wanted a simple design with no fancy stuff

  • single line statments
  • not identation dependent

Comments (0)

loading comments