Skip to content

\language not always parsed correctly #6

Description

@drtutut

Lilypond accepts language names with or without double quotes around the name.
Quickly does not recognize the language name if it is not quoted.

To reproduce, run the following code:

text = r"""
% Correctly detected
\language "nederlands"
\language "català"
\language "catalan"
\language "deutsch"
\language "english"
\language "español"
\language "espanol"
\language "français"
\language "italiano"
\language "norks"
\language "português"
\language "portugues"
\language "suomi"
\language "svenska"
\language "vlaams"

% Should be detected as well
\language nederlands
\language català
\language catalan
\language deutsch
\language english
\language español
\language espanol
\language français
\language italiano
\language norks
\language português
\language portugues
\language suomi
\language svenska
\language vlaams
"""
doc = parce.Document(LilyPond.root, transformer=True)
doc.set_text(text)
music = doc.get_transform(True)
music.dump()

The second form (without quotes) leads to lily.Language nodes with None as the detected language, followed by a lily.Symbol node containing the unparsed language name.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions