Skip to content

Feature: Introduce syntax highlighting in classic console app#13

Merged
Lamparter merged 6 commits intomainfrom
noobnotfound/syntax-colorize
Jan 19, 2025
Merged

Feature: Introduce syntax highlighting in classic console app#13
Lamparter merged 6 commits intomainfrom
noobnotfound/syntax-colorize

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