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,
|
||||
)),
|
||||
|
||||
identifier : $ => /[a-zA-Z_]\w*/,
|
||||
symbol : $ => /[!@#$%^&*-+=<>,./?{}\\|`~'\"∧∨⊙×≅]+/,
|
||||
|
||||
comment : $ => token(seq('--', /.*/)),
|
||||
|
||||
section : $ => seq(
|
||||
|
|
@ -60,7 +57,7 @@ module.exports = grammar({
|
|||
')'
|
||||
),
|
||||
|
||||
star : $ => "★",
|
||||
star : $ => choice("★", "⋆"),
|
||||
square : $ => choice('□', '[]'),
|
||||
sort : $ => choice($.star, $.square, seq($.square, /[0-9₀₁₂₃₄₅₆₇₈₉]+/)),
|
||||
|
||||
|
|
@ -177,5 +174,8 @@ module.exports = grammar({
|
|||
|
||||
command : $ => '@include',
|
||||
|
||||
identifier : $ => /[a-zA-Z_]\w*/,
|
||||
symbol : $ => /[!@#$%^&*-+=<>,./?{}\\|`~'\"∧∨⊙×≅]+/,
|
||||
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
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
|
||||
(sort
|
||||
(square))))))))
|
||||
(param_block
|
||||
(identifier)
|
||||
(expr
|
||||
(app_term
|
||||
(binex
|
||||
(app
|
||||
(term
|
||||
(sort
|
||||
(star))))))))
|
||||
(expr
|
||||
(app_term
|
||||
(binex
|
||||
|
|
|
|||
Loading…
Reference in a new issue