Steel is a simple, readable programming language designed to be easy to learn and intuitive to use. It focuses on clean syntax, minimal complexity, and fast execution through a custom JavaScript interpreter.
npm install steel-lang-2- Variables:
set x to 10 - Output:
say "Hello!" - Template Strings:
`Hello ${name}!` - Conditionals:
if / elseif / else / end - Loops:
while / for / for each / repeat - Functions:
define name as (params) ... return value endwith closures and recursion - Arrays:
[1, 2, 3]with index access,set arr[0] to val - Full Operators:
+ - * / % > < >= <= == != and or not - Comments:
// line comments - Booleans:
true,false,null - Operator Precedence: Proper precedence climbing (multiplication before addition, etc.)
abs, round, floor, ceil, sqrt, pow, min, max, random, pi, e
len, upper, lower, trim, substring, replace, split, join, contains, charAt, indexOf, startsWith, endsWith, repeat, padStart, padEnd
push, pop, shift, unshift, reverse, sort, slice, includes, flat, range
type, isNumber, isString, isArray, toString, toNumber
clock, sleep, input
git clone https://github.com/magnexis/Steel-lang.git
cd Steel-lang
node src/index.js examples/hello.steel// Variables and types
set name to "Steel"
set version to 2
// Functions with recursion
define factorial as (n)
if n <= 1 then
return 1
end
return n * factorial(n - 1)
end
say factorial(10) // 3628800
// Arrays and loops
set nums to [1, 2, 3, 4, 5]
for each n in nums
say n * n
end
// Higher-order patterns
define sum as (arr)
set total to 0
for each val in arr
set total to total + val
end
return total
end
say sum(range(1, 101)) // 5050
steel-lang/
├── src/ # Language engine
│ ├── lexer.js # Tokenizer
│ ├── parser.js # Recursive descent parser with precedence climbing
│ ├── interpreter.js # Tree-walking interpreter
│ ├── environment.js # Scope, built-ins, function closures
│ └── index.js # CLI entry point
├── examples/ # Example programs
│ ├── hello.steel
│ ├── logic.steel
│ ├── variables.steel
│ ├── features-demo.steel
│ ├── control-flow.steel
│ └── functions-arrays.steel
└── stl/ # VS Code extension
MIT