Add command parsing

This commit is contained in:
Elnu 2023-05-20 19:37:16 -07:00
parent 4113accdaa
commit 10db5e959b
3 changed files with 72 additions and 31 deletions

View file

@ -1,20 +1,3 @@
show black amogus # this is a comment
# this is a full line comment
what the heck
"this is a string with a # comment"
"this is a string over
multiple lines"
"this is \"escaped\""
'this is a single quote string'
'this also has escaped \'quotes\''
this is cool # comment
any empty array []
[
"this", # test
"is",
"an",
"array"
]
["this","is","an","array"]
huh
"Bob sat on the bench."
"Bob" "Good morning!"
eat "apple"

View file

@ -1,8 +1,8 @@
use renrs;
fn main() {
let tokens = renrs::parse_file("demo.rpy");
for token in tokens {
println!("{:?}", token);
let commands = renrs::parse_file("demo.rpy");
for command in commands {
println!("{:?}", command);
}
}