DEV Community

Cover image for Introduction to Wave v0.0.5-pre-beta: Add While Features
LunaStev
LunaStev

Posted on โ€ข Edited on

1

Introduction to Wave v0.0.5-pre-beta: Add While Features

Hello! I'm LunaStev, the developer of Wave. I'm very excited to release the v0.0.5 pre-beta version. I'm very excited to share the 5th version of Wave.

In this version, we have added a while statement.


โœ… Added Features

๐Ÿ” Loops: Full Support for while Statements

  • Basic while loops

  • Nested while loops

  • Variable declaration and initialization inside loops

  • Loop termination condition handling (supports comparison operators like <=, <, ==, etc.)

  • print and println functions work inside loops

๐Ÿงจ Control Flow

  • Support for break statements

  • Allows breaking out of loops in the middle

  • Works correctly even inside nested loops

  • (โณ Next version: continue support planned)

๐Ÿง  Variable Handling

  • Fully correct local variable scoping (e.g., a new j is created in each loop)

  • Supports var declarations (must specify types like i32, u32, etc.)

  • Allows variable reassignment (handles patterns like i = i + 1)


Showcase

Image description

Image description


Thank you for using Wave! Stay tuned for future updates and enhancements.


Installation Guide

For Linux:

  1. Download and Extract:

    • Download the wave-v0.0.5-pre-beta-linux.tar.gz file from the official source.
    • Use the wget command:
     wget https://github.com/LunaStev/Wave/releases/download/v0.0.5-pre-beta/wave-v0.0.5-pre-beta-linux.tar.gz
    
  • Extract the archive:

     sudo tar -xvzf wave-v0.0.5-pre-beta-linux.tar.gz -C /usr/local/bin
    
  1. Setting up LLVMs

    • Open a terminal and type:
     sudo apt-get update
     sudo apt-get install llvm-14 llvm-14-dev clang-14 libclang-14-dev lld-14 clang
     sudo ln -s /usr/lib/llvm-14/lib/libLLVM-14.so /usr/lib/libllvm-14.so
     export LLVM_SYS_140_PREFIX=/usr/lib/llvm-14
     source ~/.bashrc
    
  2. Verify Installation:

    • Open a terminal and type:
     wave --version
    
  • If the version number displays, the installation was successful.

Contributor

@lunastev | ๐Ÿ‡ฐ๐Ÿ‡ท


Website

Website
GitHub

Heroku

Deliver your unique apps, your own way.

Heroku tackles the toil โ€” patching and upgrading, 24/7 ops and security, build systems, failovers, and more. Stay focused on building great data-driven applications.

Learn More

Top comments (0)

AWS Security LIVE! Stream

Streaming live from AWS re:Inforce

Tune into Security LIVE! at re:Inforce for expert takes on modern security challenges.

Learn More