slight tweak to grammar to allow \star in addition to \bigstar
This commit is contained in:
parent
b646790fdb
commit
8771285fb4
2 changed files with 14 additions and 5 deletions
|
|
@ -26,9 +26,6 @@ module.exports = grammar({
|
||||||
$.fixity,
|
$.fixity,
|
||||||
)),
|
)),
|
||||||
|
|
||||||
identifier : $ => /[a-zA-Z_]\w*/,
|
|
||||||
symbol : $ => /[!@#$%^&*-+=<>,./?{}\\|`~'\"∧∨⊙×≅]+/,
|
|
||||||
|
|
||||||
comment : $ => token(seq('--', /.*/)),
|
comment : $ => token(seq('--', /.*/)),
|
||||||
|
|
||||||
section : $ => seq(
|
section : $ => seq(
|
||||||
|
|
@ -60,7 +57,7 @@ module.exports = grammar({
|
||||||
')'
|
')'
|
||||||
),
|
),
|
||||||
|
|
||||||
star : $ => "★",
|
star : $ => choice("★", "⋆"),
|
||||||
square : $ => choice('□', '[]'),
|
square : $ => choice('□', '[]'),
|
||||||
sort : $ => choice($.star, $.square, seq($.square, /[0-9₀₁₂₃₄₅₆₇₈₉]+/)),
|
sort : $ => choice($.star, $.square, seq($.square, /[0-9₀₁₂₃₄₅₆₇₈₉]+/)),
|
||||||
|
|
||||||
|
|
@ -177,5 +174,8 @@ module.exports = grammar({
|
||||||
|
|
||||||
command : $ => '@include',
|
command : $ => '@include',
|
||||||
|
|
||||||
|
identifier : $ => /[a-zA-Z_]\w*/,
|
||||||
|
symbol : $ => /[!@#$%^&*-+=<>,./?{}\\|`~'\"∧∨⊙×≅]+/,
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
Sorts
|
Sorts
|
||||||
=====
|
=====
|
||||||
|
|
||||||
def foo (A : ★) (B : □) (C : □₁) (D : []) (E : []1) (F : □1) (G : □₁₂₃) := A;
|
def foo (A : ★) (B : □) (C : □₁) (D : []) (E : []1) (F : □1) (G : □₁₂₃) (H : ⋆) := A;
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -72,6 +72,15 @@ def foo (A : ★) (B : □) (C : □₁) (D : []) (E : []1) (F : □1) (G : □
|
||||||
(term
|
(term
|
||||||
(sort
|
(sort
|
||||||
(square))))))))
|
(square))))))))
|
||||||
|
(param_block
|
||||||
|
(identifier)
|
||||||
|
(expr
|
||||||
|
(app_term
|
||||||
|
(binex
|
||||||
|
(app
|
||||||
|
(term
|
||||||
|
(sort
|
||||||
|
(star))))))))
|
||||||
(expr
|
(expr
|
||||||
(app_term
|
(app_term
|
||||||
(binex
|
(binex
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue