NYAA-PL is a tree-walk interpreted programming language developed in Python (because why not :P),
created for fun and exploration in the realms of language and compiler design. Inspired by
anime, memes and the japanese language (borrowed and native words) references, this isn't
intended for real-world use.
- Python 3.10 🐍
-
yomu("Hello, World!")
-
name wa ohayo("Enter name: ")
name wa "NYAA"
age wa 1000
pi wa 3.142
yomu(name)
yomu(age)
yomu(pi)
NYAA
1000
3.142
-
# If statement nani ( expression ) { body } # If-else statement nani ( expression ) { body } baka { body } # If-elif statement nani ( expression ) { body } nandesuka ( expression ) { body } # If-elif-else statement nani ( expression ) { body } nandesuka ( expression ) { body } baka { body }
-
# While loop daijoubu ( expression ) { body } # For loop # '_' can be used in the same way as a variable within the for loop for _ => ( start, end ) { body } for i => ( start, end ) { body }
-
# One line function kawaii func_name(param1, param2, ...) => statement # Multi-line function kawaii func_name(param1, param2, ...) => { body }
-
kawaii add(x, y) => { # return x + y modoru x purasu y } uWu_nyaa() => { result wa add(1, 1) }
# program block
uWu_nyaa() => yomu("Hello, world!");
# function definition
kawaii greet(name) {
yomu("Hello,", name)
}
# program block
uWu_nyaa() => {
# Get input from user and assign it to name
name wa ohayo("Enter name: ")
greet(name)
}