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

Feature: Introduce syntax highlighting in classic console app #13

Merged
merged 6 commits into from
Jan 19, 2025

Conversation

NoobNotFound
Copy link
Member

@NoobNotFound NoobNotFound commented Jan 19, 2025

No description provided.

@NoobNotFound NoobNotFound added the enhancement New feature or request label Jan 19, 2025
@NoobNotFound NoobNotFound self-assigned this Jan 19, 2025
@NoobNotFound
Copy link
Member Author

image
image

@NoobNotFound NoobNotFound changed the title Language Syntax Highlighting Language Syntax Highlighting (Console App) Jan 19, 2025
@Lamparter Lamparter changed the title Language Syntax Highlighting (Console App) Feature: Introduce syntax highlighting in classic console app Jan 19, 2025
Introduced a new `SyntaxHighlighter` class in `SyntaxHighlighter.cs` to handle syntax highlighting for different programming languages. This class includes a dictionary mapping languages to syntax rules, a method to display highlighted code, and a `SyntaxRule` class.

Updated `InteractiveMode` and `Program` classes to use `SyntaxHighlighter` for displaying code with syntax highlighting instead of plain text.

Added a user prompt to press any key at the end of the `InteractiveMode` method to improve user interaction.
@Lamparter Lamparter force-pushed the noobnotfound/syntax-colorize branch from a88aa28 to 4dc5d98 Compare January 19, 2025 08:27
@Lamparter Lamparter force-pushed the noobnotfound/syntax-colorize branch from 7a0b55e to 1b5cd52 Compare January 19, 2025 08:42
These are specific to .NET, but it looks good universally.
Copy link
Contributor

@Lamparter Lamparter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Lamparter Lamparter merged commit 173a9a0 into main Jan 19, 2025
4 of 6 checks passed
@Lamparter Lamparter deleted the noobnotfound/syntax-colorize branch January 19, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants