mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-10-05 19:27:30 +03:00
Merge pull request #14 from NoamDev/ascii-alternatives
fix ascii syntax for lambda and forall
This commit is contained in:
commit
2434f5f901
@ -83,7 +83,9 @@ impl<'i> KindParser<'i> {
|
|||||||
|
|
||||||
// ALL ::= ∀(<name>: <term>) <term>
|
// ALL ::= ∀(<name>: <term>) <term>
|
||||||
// "forall" can be used as an ascii alternative to "∀"
|
// "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;
|
let ini = *self.index() as u64;
|
||||||
if self.starts_with("∀") {
|
if self.starts_with("∀") {
|
||||||
self.consume("∀")?;
|
self.consume("∀")?;
|
||||||
@ -104,7 +106,9 @@ impl<'i> KindParser<'i> {
|
|||||||
|
|
||||||
// LAM ::= λ<name> <term>
|
// LAM ::= λ<name> <term>
|
||||||
// "lambda" can be used as an ascii alternative to "λ"
|
// "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;
|
let ini = *self.index() as u64;
|
||||||
if self.starts_with("λ") {
|
if self.starts_with("λ") {
|
||||||
self.consume("λ")?;
|
self.consume("λ")?;
|
||||||
|
Loading…
Reference in New Issue
Block a user