0.3.1 • Published 2 years ago
calcium-js v0.3.1
Calcium is run based on commands.
Each command is represented as a JSON array.
[
[1, [], "=", ["var", "message"], "Hello, World."],
[1, [], "print", ["var", "message"]],
[1, [], "end"]
]
Basically, the commands are equivalent to statements. The meaning of each element in the command is as follows:
- Indent (integer)
- Option (any)
- Command keyword (
string
) - (After that) Arguments (
array
)
What is the "indent"?
Indent in Calcium is what the Python language calls indentation.
Increase the value of the indent if you need a block,
for example if
or while
.
[
...
[1, [], "if", ["==", ["var", "i"], 10]],
[2, [], "print", ["var", "i"]],
...
]
The code above corresponds to:
if i == 10:
print(i)
Is the Calcium an esoteric language or just a joke?
No, I don't think so. Here is one of the applications. It is suitable for environments that generate code programmatically.
0.3.0
2 years ago
0.3.1
2 years ago
0.1.0
2 years ago
0.2.0
2 years ago
0.1.1
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
3 years ago
0.0.4
3 years ago
0.0.3
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago
1.1.4
8 years ago
1.1.3
8 years ago
1.1.2
8 years ago
1.1.1
8 years ago
1.1.0
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago