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

Resolves #4246, use recursive descent parser to implement ifeval #4247

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

Conversation

Light6533
Copy link

Resolves #4246

I notice that your implement of ifeval seems incomplete, so i reference recursive descent parser of Python 3 to implement ifeval_parser.rb to support "and" "or" operator.

Here is my sample code to verify:

:product: C

ifeval::["{product}" == "A" or "{product}" == "B"]
:XLEN: 32
endif::[]
ifeval::["{product}" != "A" and "{product}" != "B"]
:XLEN: 64
endif::[]

{product} is a {XLEN}-bit microprocessor.

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.

ifeval is not like AsciiDoc.py
1 participant