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

feat: full syntax highlights and interactive compiler error reporting indicated using a red squiggly line under the affected symbols. #1700

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

paxcut
Copy link
Contributor

@paxcut paxcut commented May 23, 2024

  • Added an under-squiggled text function to imgui extensions.
  • Syntax highlighter supports identifier validation and attempts to use contextually invalid identifiers results in error denoting coloration.
  • Moved shortcuts from text editor to shortcut manager in view_pattern_editor.cpp.
  • Removed all the language definition code.
  • Added a text preprocessing function to remove /t and use standard newlines.
  • Changed uses of int and unsigned to i32 and u32 or equivalent.
  • Changed theme files to use the new names for the color palette entries, but they should remain the same for the most part. - Added a full syntax highlighting theme for pattern language based on the previous Dark theme and clion's darcula which is called Clark
  • Search-replace in pattern editor retained found matches when text was edited.
  • Incorporated blinking cursor resetting to new functions that move the cursor and streamlined previous entries under mouse editing.

paxcut added 2 commits May 23, 2024 05:00
… indicated using a red squiggly line under the affected symbols.

Added an under-squiggled text function to imgui extensions.
Syntax highlighter supports identifier validation and attempts to use contextually invalid identifiers results in error denoting coloration.
Moved shortcuts from text editor to shortcut manager in view_pattern_editor.cpp.
Removed all the language definition code.
Added a text preprocessor to remove /t and use standard newlines.
Changed uses of int and unsigned to i32 and u32 or equivalent.
Changed theme files to use the new names for the color palette entries, but they should remain the same for the most part.
Added a full syntax highlighting theme for pattern language based on the previous Dark theme and clion's darcula which is called Clark
Search-replace in pattern editor retained found matches when text was edited.
Incorporated blinking cursor resetting to new functions that move the cursor and streamlined previous entries under mouse editing.
@paxcut
Copy link
Contributor Author

paxcut commented May 23, 2024

Note that this changes won't compile until the latest pattern language submodule pr that i submitted is merged and the pattern language submodule is updated in imhex to use the merged code.

paxcut and others added 14 commits July 30, 2024 13:49
…nd per provider saved cursor position.Also includes other fixes and additions as follows.

improv: Changed palette index names from patternPlacedVariable to calculatedPointer and from patternLocalVariable to localVariable. Also added new entry for views.
improv: removed redundant enumerations for colors not really needed
improv: implemented a better handling of the color information that is both more efficient and thread safe. Colorizer stages the glyph colors and text editor commits the changes.
improv: favor using over typedefs. better names for text editor variables
fix: find/replaces matches were being incorrectly kept after editions that moved them.
improv: moved all highlighting code to its own file.
improv: preprocess text when provider is opened to remove tabs and other things.
improv: when text is changed, highlighter must wait for parser to finish and once highlighting starts, parser will not start parsing new changes until highlighting is finished with the file or else the data being processed will get corrupted by new incoming changes.
improv: incorporated new highlighting system to the editor console.
Fix: changed palette index entries used by pattern drawer to color namesin pattern data window to the new names that correspond to the ones being used before.
…sts. Added comments, removed old code and formatted code to follow imhex code style a bit more.
fix: Moved checking for import keyword to member chains.
fix: global variables were labeled incorrectly as being local
fix: linkAttributes was checking for last line incorrectly
Removed unused assigned values.
fix: When globals are defined in imported or included files they can't be detected as valid global identifiers, so unknown identifiers found in global scope are always labeled as valid.
Removed unused included files and unused code
…sing ".

fix: After doing a search, scrolling to another position with the wheel and using left-click to set the cursor would revert the scrolling to the last search when typing chars.
fix: After doing a search, if the file was edited at a place before the matches the locations of the matches were not being updated to include the editions.
…rt because UDT definitions had the wrong information. Enums defined in imports or includes cannot resolve the members so they are always labeled as pattern variables.
…re being identified as globals much too early. Their identification prevented the detection of member variables highlight colors.
@paxcut paxcut marked this pull request as draft September 14, 2024 12:18
@paxcut
Copy link
Contributor Author

paxcut commented Sep 14, 2024

I am turning this one into a draft as well as it is being implemented as a set of smaller PRs for the sake of easier reviewing. Once the set is complete I'll close it but I want to keep it around so I can make sure everything was included.

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.

1 participant