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

Pattern language changes for syntax highlight code thatwill be pr'd to Imhex's repo later today. #108

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

paxcut
Copy link
Contributor

@paxcut paxcut commented May 22, 2024

  • Better parser support for identifier types of variable definitions only.
  • Fixed typo in parser_manager.cpp.
  • Parser errors were overwriting preprocessor/lexer errors. Make sure they are all added.
  • If ast fails to be created make sure that the parsed tokens are saved before returning.
  • Change a variable to a more appropriate name in preprocessor and remove excluded location validation.
  • Rearrange identifier type enumeration values to support value ordering of importance (bigger are more important types and preferred if choice can be made). Also removed types that were not identifiers.

paxcut and others added 2 commits May 20, 2024 11:32
… identifier types of variable definitions only. Fixed typo in parser_manager.cpp. Parser errors were overwriting preprocessor/lexer errors. Make sure they are all added. If ast fails to be created make sure that the parsed tokens are saved before returning. Change to a more appropriate name in preprocessor and remove excluded location validation. Rearrange identifier type enumeration values to support value ordering of importance (bigger are more important types and preferred if choice can be made). Also removed types that were not identifiers.
@codecov-commenter
Copy link

codecov-commenter commented May 22, 2024

Codecov Report

Attention: Patch coverage is 14.81481% with 46 lines in your changes are missing coverage. Please review.

Project coverage is 25.04%. Comparing base (850e296) to head (e527553).

Files Patch % Lines
lib/source/pl/core/parser.cpp 0.00% 12 Missing and 27 partials ⚠️
lib/source/pl/pattern_language.cpp 37.50% 2 Missing and 3 partials ⚠️
lib/source/pl/core/evaluator.cpp 50.00% 0 Missing and 1 partial ⚠️
lib/source/pl/core/parser_manager.cpp 50.00% 0 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #108   +/-   ##
=======================================
  Coverage   25.04%   25.04%           
=======================================
  Files         137      137           
  Lines        9940     9936    -4     
  Branches     5506     5500    -6     
=======================================
- Hits         2489     2488    -1     
+ Misses       4850     4849    -1     
+ Partials     2601     2599    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…here the next break will occur. The value returned by getPauseLine() is the number of the line above the one it wants, but the values it may return range from zero to lines-1. When the code that's being executed cannot be seen because it is in another file, the debugger sets the line to zero which in turn is adjusted to line number by subtracting one. As negative line number locations are asserted against getPauseLine() now makes sure that the smallest number it can return is one.

fix: found a bug where multi variable definitions were being label incorrectly by the parser which caused the highlighter to ignore all instances of the variables. Due to the name of the function involved it  appeared that only custom type member definitions were being processed, but it appears the function variable definitions were processed by the code. In order to tell one set of variables from the other an specific node variable that only exists in one of the two provides the litmus test.
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.

None yet

2 participants