Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LilyPond: slightly improve lexing #2283

Merged
merged 1 commit into from Nov 27, 2022
Merged

LilyPond: slightly improve lexing #2283

merged 1 commit into from Nov 27, 2022

Commits on Nov 27, 2022

  1. LilyPond: slightly improve lexing

    * Handle `--` and `__` as `Token.Punctuation` only if preceded by
      whitespace:
    
      ```
      <whitespace> --  ==>  hyphen (in lyrics mode)
      <whitespace> __  ==>  extender line (in lyrics mode)
      --               ==>  tenuto, neutral attachment (in music mode)
      __               ==>  portato, down attachment (in music mode)
      ```
    
    * Handle `-` followed by a number as `Token.Number` only if preceded by
      whitespace.  This is purely heuristic, derived from the coding style shown
      in the LilyPond manuals.
    
      ```
      <whitespace> -3  ==>  integer (e.g., as a function argument)
      -3               ==>  fingering instruction
      ```
    
    * Add forgotten `\maxima` note duration.
    
    * Some legibility improvements by using verbose mode for regular
      expressions.
    
    * Some comment additions and fixes.
    
    * Update tests.
    lemzwerg committed Nov 27, 2022
    Configuration menu
    Copy the full SHA
    e1a07d0 View commit details
    Browse the repository at this point in the history