Merge pull request #14 from NoamDev/ascii-alternatives

fix ascii syntax for lambda and forall
This commit is contained in:
Victor Taelin 2024-06-08 12:27:06 -03:00 committed by GitHub
commit 2434f5f901
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -83,7 +83,9 @@ impl<'i> KindParser<'i> {
// ALL ::= ∀(<name>: <term>) <term>
// "forall" can be used as an ascii alternative to "∀"
if self.starts_with("") || self.starts_with("forall") {
if self.starts_with("") ||
self.starts_with("forall ") ||
self.starts_with("forall(") {
let ini = *self.index() as u64;
if self.starts_with("") {
self.consume("")?;
@ -104,7 +106,9 @@ impl<'i> KindParser<'i> {
// LAM ::= λ<name> <term>
// "lambda" can be used as an ascii alternative to "λ"
if self.starts_with("λ") || self.starts_with("lambda") {
if self.starts_with("λ") ||
self.starts_with("lambda ") ||
self.starts_with("lambda(") {
let ini = *self.index() as u64;
if self.starts_with("λ") {
self.consume("λ")?;