Skip to content

Commit

Permalink
Avoid using grammar in this problematic construct.
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Oct 28, 2021
1 parent 9aecaa5 commit e1b4c92
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions chapters/annotations.tex
Expand Up @@ -1117,13 +1117,12 @@ \section{Annotations for the Graphical User Interface}\label{annotations-for-the

This section describes the annotations that are used to define properties of the graphical user interface.

\begin{lstlisting}[language=grammar]
preferred-view-annotation:
annotation "(" preferredView "=" ( """ "info" """ | """ "diagram" """ | """ "text" """ ) ")"
\begin{lstlisting}[language=modelica]
annotation(preferredView = "$layer$" )
\end{lstlisting}

The \fmtannotationindex{preferredView} annotation defines the default view when selecting the class.
\lstinline!info! means info layer, i.e., the documentation of the class, \lstinline!diagram! means diagram layer and \lstinline!text! means the Modelica text layer.
The layer is a String literal where \lstinline!"info"! means info layer, i.e., the documentation of the class, \lstinline!"diagram"! means diagram layer and \lstinline!"text"! means the Modelica text layer.

\begin{lstlisting}[language=grammar]
documentation-class-annotation:
Expand Down

0 comments on commit e1b4c92

Please sign in to comment.