Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Zero Language Support (For learning compiler development and testing compiler)New to Visual Studio Code? Get it now.
Zero Language Support (For learning compiler development and testing compiler)

Zero Language Support (For learning compiler development and testing compiler)

Miracle.

|
1 install
| (1) | Free
Language support and runner for Zero programming language (.zr files) - A project for testing compiler while learning how to develop a compiler.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Zero Language Support

A Visual Studio Code extension for testing and running Zero programming language - a custom language created for self-learning compiler development.

📚 About This Project

This extension is designed to test a self-written compiler for the Zero programming language. Zero is a simple C-like language created as a learning exercise to understand:

  • Lexical analysis and parsing
  • Abstract syntax tree (AST) construction
  • Semantic analysis and type checking
  • Code generation and compilation techniques
  • Language tooling integration

🔧 Language Features

Zero is a minimalistic programming language with:

  • Data Types: int(int32), double, bool, ...
  • Control Flow: if-else statements, while loops
  • Functions: User-defined functions with parameters and return values
  • Built-in Function: Only printf() is provided as an external function
  • C-like Syntax: Familiar syntax for ease of learning

📝 Example Code

Here's a sample Zero program (main.zr):

// main function
int main()
{
    int32 sum = Sum(1, 100);
    double pi = 3.1415926;
    printf("Result is %d.\n", sum);
    printf("Result is %d - 1.\n", PlusOne(sum));
    printf("Pi is %f\n", pi);
    bool b = true;
    if (b)
    {
        printf("true");
    }
    else printf("false");
    return 0;
}

int PlusOne(int x)
{
    x += 1;
    return x;
}

int Sum(int start, int end)
{
    int sum = 0;
    while (!(start > end))
    {
        sum += start;
        start += 1;
    }
    return sum;
}

✨ Extension Features

  • File Association: Automatically recognizes .zr files as Zero language files
  • One-Click Execution: Run Zero programs directly from VS Code
  • Terminal Integration: Execute programs in VS Code's integrated terminal
  • Keyboard Shortcuts: Press Ctrl+F5 to quickly run your programs

🚀 Getting Started

Prerequisites

  • Visual Studio Code
  • The Zero compiler (zeror.exe) is bundled with this extension

Usage

  1. Create a new file with .zr extension (e.g., main.zr)
  2. Write your Zero program (see example above)
  3. Click the ▶️ Run button in the editor toolbar, or
  4. Press Ctrl+F5, or
  5. Right-click and select "Run Zero File"

The program will execute in VS Code's integrated terminal.

🎯 Compiler Testing

This extension serves as a practical testing environment for the Zero compiler, allowing you to:

  • Write test programs quickly
  • Execute them with a single click
  • View compilation errors and runtime output
  • Iterate on compiler improvements efficiently

⚠️ Educational Purpose

Important Note: This is an educational project created for learning compiler development. The Zero language and its compiler are experimental tools designed for:

  • Understanding compilation processes
  • Testing language design concepts
  • Exploring compiler optimization techniques

This is not intended for production use but rather as a practical learning platform.

🛠️ Language Limitations

Currently, Zero language has intentional limitations to keep the compiler implementation focused:

  • Single built-in function: Only printf() is available for output
  • No standard library: Minimal runtime environment
  • Basic type system: Simple data types only
  • No advanced features: No classes, modules, or complex data structures

📄 License

This project is developed for educational purposes as part of compiler development studies.

🎓 Learning Resources

This extension demonstrates practical implementation of:

  • Language server protocol concepts
  • VS Code extension development
  • Compiler testing workflows
  • IDE integration for custom languages

Perfect for compiler enthusiasts and language design learners! 🚀

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft