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

Wrap keywords that were \terminal{} with \keyword{} instead #7602

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ilazaric
Copy link
Contributor

@ilazaric ilazaric commented Feb 2, 2025

My impression is that keywords should be \keyword{<string>} usually, no surrounding command, except in one of grammar definitions, where they should be wrapped in a \terminal{...}

Didn't do this on a couple occurences in preprocessor.tex (if and else are in \terminal{} args):

\begin{bnf}\obeyspaces
\nontermdef{else-group}\br
    \terminal{\# else   } new-line \opt{group}
\end{bnf}
\begin{ncsimplebnf}\obeyspaces
\indextext{\idxcode{\#if}}%
\terminal{\# if     } constant-expression new-line \opt{group}\br
\indextext{\idxcode{\#elif}}%
\terminal{\# elif   } constant-expression new-line \opt{group}
\end{ncsimplebnf}
\begin{bnf}\obeyspaces
\nontermdef{if-group}\br
    \terminal{\# if     } constant-expression new-line \opt{group}\br
    \terminal{\# ifdef  } identifier new-line \opt{group}\br
    \terminal{\# ifndef } identifier new-line \opt{group}
\end{bnf}

I don't think these are quite the same meaning as keyword if

Also, there are many instances of keywords not being \keyword-ed in \tcode{} parts, this PR does not touch those

Additionally some minor cleanup

  • expressions.tex: \keyword{U} -> \tcode{U}
  • lex.tex: removed space between command and argument

@ilazaric
Copy link
Contributor Author

ilazaric commented Feb 15, 2025

Last commit fixes spacing in overloading.tex, bnf for operator (that I broke in previous commits to this PR)
I originally didn't realize the spacing was important
Rendered and it looks good:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants