Skip to content

feat: syntax overhaul for v0.2.0 - #2

Merged
sa-nafi merged 1 commit into
mainfrom
v0.2.0
Jul 18, 2026
Merged

sa-nafi merged 1 commit into
mainfrom
v0.2.0

Conversation

@sa-nafi

@sa-nafi sa-nafi commented Jul 18, 2026

Copy link
Copy Markdown
Owner

This pull request introduces Vipr v0.2.0, a major update that transitions the language from C-style braces and semicolons to a Python-inspired, indentation-based syntax. It updates the language guide, changelog, and documentation to reflect new syntax, keywords, block scoping, and improved compiler internals. The update also deprecates the old v0.1 specification.

Language and Syntax Overhaul:

  • Vipr now uses indentation-based (Python-style) block scoping, removes semicolons and curly braces, and introduces colons and indentation for code blocks. [1] [2]R1, [3]
  • New keywords and syntax: let/const for variable and constant declarations, def for functions, elif for conditional chaining, and logical operators and, or, not. [1]R1, [2]
  • Multiple assignments and declarations are now supported, with right-hand sides safely evaluated before assignment (enabling idioms like a, b = b, a). [1] [2]

Input/Output and Control Flow:

  • print and input now accept multiple arguments and are implemented as built-in statements, replacing the previous scan function. [1] [2]
  • Control flow statements (if, elif, else, while, for) use the new syntax and strict type enforcement for conditions. Range-based for loops are introduced. [1] [2]

Compiler and Codebase Updates:

  • The lexer and parser are updated for indentation and parenthesis tracking, and the code generator now emits standard C code for I/O without relying on C11 _Generic macros. [1] [2]
  • The documentation and changelog are revised to match the new language features and architecture. The old v0.1 specification is marked as deprecated. [1] [2]

Documentation and Examples:

  • All guides, code examples, and the sample program in README.md are rewritten to use the new syntax and features. [1]R1, [2]
  • The changelog provides a detailed breakdown of all major changes and new features in v0.2.0.

Deprecations:

  • The old C-style syntax and the v0.1 language specification are explicitly deprecated in the documentation. [1] [2]

@sa-nafi
sa-nafi merged commit 2a28e47 into main Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant