Skip to main content

Basic Syntax

Kexra's syntax is designed for readability: statements separated by newlines, keywords in lowercase, and minimal punctuation.

Why this exists

Understanding basic syntax rules prevents syntax errors and enables writing correct programs from the start.

How it works

Programs consist of statements ending with newlines. Keywords are reserved words, identifiers start with letters.

Examples

# Comment
say "Hello" # Statement
set x = 42 # Another statement

Common mistakes

  • Using semicolons
  • Starting identifiers with numbers
  • Misspelling keywords