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

Yaml,OpenAPI: make OpenAPI parser's stack related code reusable #3295

Merged
merged 3 commits into from
Feb 17, 2022

Conversation

masatake
Copy link
Member

@masatake masatake commented Feb 5, 2022

The technique used in OpenAPI may be helpful to implement another YAML subparser.
So, I moved the code implementing the technique to the YAML parser experimentally in this change.

The original code uses an array of keywords for pointing out interesting tokens.
This change uses a string for the same purpose. The routines in this change convert the string to an array of keywords.
Till a real specification and its implementation becomes available, we call the format of the string Ypath.

@codecov
Copy link

codecov bot commented Feb 5, 2022

Codecov Report

Merging #3295 (ffa6193) into master (63383cc) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

❗ Current head ffa6193 differs from pull request most recent head 871007d. Consider uploading reports for the commit 871007d to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3295      +/-   ##
==========================================
- Coverage   85.31%   85.28%   -0.04%     
==========================================
  Files         210      211       +1     
  Lines       49784    49866      +82     
==========================================
+ Hits        42475    42529      +54     
- Misses       7309     7337      +28     
Impacted Files Coverage Δ
parsers/openapi.c 96.49% <100.00%> (+0.24%) ⬆️
parsers/yaml.c 96.35% <100.00%> (+4.28%) ⬆️
optlib/org.c 0.00% <0.00%> (ø)
parsers/r.c 90.57% <0.00%> (+0.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63383cc...871007d. Read the comment docs.

@masatake
Copy link
Member Author

masatake commented Feb 6, 2022

I will rebase the changes of #3258 on this pull request.

masatake and others added 3 commits February 8, 2022 01:40
The technique used in the OpenAPI may be helpful to implement another YAML subparser.
So, I moved the code implementing the technique to the YAML parser experimentally
in this change.

The original code uses an array of keywords for pointing out interesting tokens.
This change uses a string for the same purpose. The routines in this change
convert the string to an array of keywords.
Till a real specification and its implementation becomes available, we call
the format of the string Ypath.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
@masatake
Copy link
Member Author

masatake commented Feb 13, 2022

@segoon, based on your "Array-based element-in-yaml specifier", I implemented "String-based element specifier".
Could you see 871007d ?

@masatake masatake merged commit 8e1e0a2 into universal-ctags:master Feb 17, 2022
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