dwcoates / pygn-mode

An Emacs major-mode for chess PGN files, powered by Python
BSD 2-Clause "Simplified" License
10 stars 3 forks source link

Support LAN moves, which were recently added to the grammar #200

Closed rolandwalker closed 1 year ago

rolandwalker commented 3 years ago

~This is branched off of #199, and will look like a mess until rebased.~ rebased

Since the upstream packaged grammar now recognizes LAN moves, we add support for them here, treating them identically to SAN moves in every regard, including faces.

Bug: the grammar does not yet support LAN moves within variations, which is already fixed upstream but not propagated to the Emacs package.

Many LAN-style moves will still be denoted as san_move in the CST, but LAN captures will always be denoted as lan_move. This should not cause any issues visible to the user, since the two are always treated the same in the code.