Implement define statements

This commit is contained in:
Elnu 2023-05-28 12:23:50 -07:00
parent abc17c7c3c
commit fcfe7171b5
5 changed files with 176 additions and 48 deletions

9
demo/Cargo.lock generated
View file

@ -1739,9 +1739,9 @@ dependencies = [
[[package]]
name = "regex"
version = "1.8.1"
version = "1.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370"
checksum = "81ca098a9821bd52d6b24fd8b10bd081f47d39c22778cafaa75a2857a62c6390"
dependencies = [
"aho-corasick",
"memchr",
@ -1750,9 +1750,9 @@ dependencies = [
[[package]]
name = "regex-syntax"
version = "0.7.1"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c"
checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78"
[[package]]
name = "renrs"
@ -1760,6 +1760,7 @@ version = "0.1.0"
dependencies = [
"pest",
"pest_derive",
"regex",
]
[[package]]

View file

@ -1,5 +1,6 @@
# Control testing
"Bob" "I will not say anything"
"Bob" "I will not say anything, [foo]"
define foo = "bar"
if False:
"Bob" "W-what? Why am I saying this?"
if True:
@ -11,4 +12,6 @@ if True:
"Bob" "...cereal!"
if False:
"Bob" "But I actually hate it."
define bar = "potato"
define foo = bar
"Bob sat on the bench."