Skip to content

Releases: greenbugx/EasyLang

EasyLang v0.1.2

16 Dec 18:12

Choose a tag to compare

Logo_nobg ELPM_nobg

EasyLang v0.1.2 — Pattern Matching, Tooling & UX Upgrade

Release Date: December 16, 2025


Overview

EasyLang v0.1.2 is a feature-focused release that introduces a powerful match statement, expands object-oriented programming with full class support, improves assignment handling, and upgrades the official VS Code extension with richer syntax highlighting and smarter indentation.
This version significantly improves language ergonomics, control flow expressiveness, OOP capabilities, and day-to-day editing experience when writing EasyLang code.


Key Features

🎯 New match Statement (Pattern Matching)

A new match construct brings clear, expressive branching over values, similar to switch/pattern matching in modern languages. It supports:

  • Matching on:
    • Strings ("Monday", "pending")
    • Numbers (ints & floats)
    • Booleans (true / false)
    • Expressions (e.g. x plus y, status.get_code())
  • Multiple values in a single branch using or
match letter with [
    when "A" or "E" or "I" or "O" or "U" then [
        print "Vowel"
    ]
    otherwise [
        print "Consonant"
    ]
]
  • Optional otherwise branch for fallback logic
  • Use inside:
    • Top-level code
    • Loops (repeat ... do [ match ... ])
    • Class methods
    • Nested match blocks

The implementation is covered by a 15‑test suite:

  • Basic string/number/boolean matching
  • No-otherwise cases
  • Multi-value or branches
  • Nested matches
  • Matching on expressions and method calls
  • Matching with variable assignments
  • Multi-statement match branches
  • Class method + match integration

🧩 Interpreter Support for match

The interpreter now understands and executes match_stmt nodes:

  • Evaluates the match expression once
  • Iterates over when clauses in order, executing the first branch whose value list contains an equal value
  • Falls back to otherwise when no branch matches
  • Match branch bodies execute in the current scope:
    • Assignments inside when/otherwise (like result be "Excellent") correctly update outer variables
    • Works as expected inside methods, loops, and nested control flow

This makes match a first-class control-flow construct, not just syntax sugar.


Object-Oriented Programming (Classes & Methods)

🏗️ Full Class Support with Constructors & Methods

EasyLang now has comprehensive OOP support for building modular, stateful programs:

  • Define classes with fields and methods:
define class PaymentProcessor:
[
    let status be "pending"

    define method when_created(s):
    do [
        self.status be s
    ]

    define method process():
    do [
        match self.status with [
            when "pending" then [
                print "Processing payment..."
            ]
            when "completed" then [
                print "Payment already completed"
            ]
            otherwise [
                print "Unknown status"
            ]
        ]
    ]
]

make payment be PaymentProcessor("pending")
payment.process()
  • Constructors via when_created method with parameters
  • Instance fields initialized with default values
  • Instance methods with full access to self
  • Field access & assignment via self.field be value
  • Method calls on instances: obj.method(args)
  • Method integration with all language features (match, loops, conditionals, etc.)
  • Object state management across method calls

Classes enable modular, maintainable code with encapsulation and state management — critical for larger programs and real-world applications.


Language & Parser Improvements

Correct Simple Assignments (ID be expr) in All Contexts

The parser now properly recognizes bare assignments like:

result be "Excellent"
status_msg be "Starting system..."
is_running be true
x be 10

including when they appear inside:

  • match branches
  • Class methods
  • General [ ... ] blocks

Previously, ID be expr inside certain blocks could confuse the parser and cause hangs. The new logic explicitly handles ASSIGN after an identifier in parse_statement, fixing these edge cases.


VS Code Extension Enhancements

Richer Syntax Highlighting

The easylang.tmLanguage.json grammar has been upgraded to reflect the current interpreter and language surface:

  • Control keywords:
    • if, then, else, else if, repeat, while, from, to, do, try, handle, continue, break, return
  • Pattern matching:
    • match, when, otherwise, with
  • Object-Oriented Programming:
    • class, define, method, make, self
    • Instance creation and method invocation
  • Declarations & types:
    • let, constant, so, class, define, method, make
    • Primitive types: int, float, text, boolean
  • Logic & comparison:
    • and, or, not, equals, not equals
    • ==, !=, <, >, <=, >=
  • Arithmetic & math words:
    • plus, minus, less, greater, mul, div, modulus, expo
    • Symbol operators: + - * / %, **, //
  • I/O & modules:
    • print, read, open, close, readline, writeline, write, append, bring, as, into, for, with
  • Literals & builtins:
    • true, false, null
    • self highlighted as a special language variable

Block comments ($$ ... $$) and line comments ($ ...) are also clearly scoped.

This gives much better color separation between control flow, operations, types, objects, and identifiers, making EasyLang code more readable in VS Code.


Smarter Indentation & Bracket Behavior

The language-configuration.json has been extended to better match EasyLang's block-oriented style:

  • Automatic indentation after:
    • if ... then
    • else, else if ... then
    • repeat, while, match ... with
    • when ... then, otherwise
    • define ... : do, define class ...:
    • define method ... : do
    • try, handle
  • Block-aware enter rules for [ ... ]:
    • Typing Enter between [ and ] produces an indented block with proper outdent on closing ]
  • Auto-closing for:
    • [], (), ""

This makes writing structured code (especially match, classes, method bodies) much smoother in the editor.


Improvements & Highlights

  • New match statement with robust interpreter and parser backing
  • Full OOP support with classes, constructors, instance methods, and field management
  • 15-case regression test suite for pattern matching behavior
  • Correct handling of simple ID be expr assignments in any block, preventing parser hangs
  • VS Code extension now aligned with actual language tokens, OOP features, and semantics
  • More expressive and colorful syntax highlighting for control flow, pattern matching, OOP, types, and operators
  • Smarter indentation rules for match/when/otherwise, class/method bodies, and general block structures

Known Issues

  • Standard library is still evolving; match currently focuses on literal equality (no destructuring yet)
  • No formal pattern language (guards, deep patterns, etc.) — this may come in future versions
  • Class inheritance not yet implemented (planned for v0.1.5)
  • Tooling is optimized for VS Code; other editors will need their own syntax definitions
  • The language surface is growing; some advanced patterns might not yet be covered by tests

EasyLang v0.1.2 is a big step toward a more expressive and pleasant language to write in — bringing modern pattern matching, full object-oriented programming, reliable assignment behavior, and a much better editing experience through the upgraded VS Code extension.

Your feedback and test programs drive the roadmap — enjoy the new match power, OOP capabilities, and editor polish!

Full Changelog: v0.1.1...v0.1.2

EasyLang v0.1.1

25 Nov 20:13

Choose a tag to compare

Logo_nobg ELPM_nobg

EasyLang v0.1.1 — Major Stability & Feature Upgrade

Release Date: November 26, 2025


Overview

EasyLang v0.1.1 is a major refinement update focused on stability, module improvements, math expansion, accurate error reporting, and a fully redesigned Windows installer.
This release greatly enhances developer experience, interpreter correctness, tooling reliability, and module ecosystem support — marking the first big upgrade since v0.1.0.


Key Features

🧠 Module-Aware Error Reporting

Errors inside imported .elangh modules now display:

  • Correct filename
  • Correct line number
  • Correct column
  • Correct source preview
  • No more “Invalid error location” issues

This dramatically improves debugging and development workflow.


🔢 Advanced Math Module Overhaul

The built-in math.elangh module has been completely upgraded to include:

Vector Math

  • 2D & 3D vectors (vec2, vec3)
  • Add, subtract, scale
  • Dot product, cross product
  • Length, normalize
  • Distance functions

Matrix Operations

  • Identity matrix generation
  • Matrix creation
  • Add / Subtract
  • Matrix × Matrix multiplication
  • Matrix × Vector multiplication
  • Transpose

Complex Numbers

  • Addition, subtraction
  • Multiplication, division
  • Magnitude
  • Angle
  • Polar → Cartesian conversions

Extended Statistics

  • Median
  • Mode
  • Variance / Standard deviation
  • Sample variance / Sample stddev

Noise Functions

  • 1D/2D/3D smooth noise
  • Basic Perlin-style interpolation
  • Grid noise demo included

This is now a fully featured scientific math library for ELang.


⚙️ Interpreter Improvements

  • Added file_stack for tracking nested module imports
  • Added file_source_map for accurate error context
  • Parser upgraded to include file paths in SyntaxError
  • RuntimeError enriched with file, line, and column
  • Clean, readable error formatting

Interpreter now behaves much closer to a real language runtime.


Improvements & Highlights

  • Math module now matches real-world scripting languages
  • Interpreter is more stable and accurate
  • Installer now production-quality
  • Advanced math test suite included
  • Cleaner error handling and debugging output

Known Issues

  • Standard library is still growing
  • No dedicated module/package standard yet
  • REPL may behave differently across terminals
  • Graphical installer doesn't refresh PATH immediately (logout may be required unless PATH refresh is added)

EasyLang v0.1.1 is a major step forward — improving reliability, math power, developer experience, and tooling.
Your feedback shapes the future of the language — enjoy coding with EasyLang!

Full Changelog: v0.1.0...v0.1.1

EasyLang v0.1.0

23 Nov 18:36

Choose a tag to compare

EasyLang v0.1.0 — First Release

Release Date: November 24, 2025

Overview

EasyLang v0.1.0 is the first public release of a new programming language, built for clarity and ease of use. This version introduces the initial set of core features and lays the foundation for future development.

Key Features

  • Interactive REPL: Start coding instantly in the terminal with an intuitive Read-Eval-Print Loop ("REPL") — makes experimenting easy and fast.
  • Simple Syntax: Designed with beginner-friendly commands and readable structure.
  • Basic Control Flow: Supports variables, arithmetic, if/else statements, loops, and functions.
  • Error Handling: Clear error messages help users spot and fix issues quickly.
  • Extensible Interpreter: Modular design allows for future expansion and custom tooling.

Improvements & Highlights

  • Initial stable API for experimenting and building small projects.
  • Lightweight installation and easy setup; seamless integration into development workflows.
  • Automatic PATH addition via installer (planned, feedback welcome).

Known Issues

  • Limited standard library — more built-in commands planned for future releases.
  • REPL compatibility may vary across different terminals (especially on Windows).
  • Advanced features (such as native modules and package manager) targeted for future updates.

Getting Started

  • Download EasyLang v0.1.0 from the project repository.
  • Run el.py or the installer to launch the interactive REPL.
  • Share feedback and issues via project channels!

EasyLang v0.1.0 is an early milestone, and your feedback will help guide future development. Try it out, experiment, and let the development team know how EasyLang can serve you better!