slight tweak to grammar to allow \star in addition to \bigstar

This commit is contained in:
William Ball 2025-09-13 09:11:13 -04:00
parent b646790fdb
commit 8771285fb4
No known key found for this signature in database
2 changed files with 14 additions and 5 deletions

View file

@ -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 : $ => /[!@#$%^&*-+=<>,./?{}\\|`~'\"∧∨⊙×≅]+/,
}
});

View file

@ -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