Syndiesis Save

The most revolutionary syntax visualizer

Project README

Syndiesis

The most revolutionary syntax visualizer for C#

Motivation

The project was inspired by the task for applying into a Roslyn internship position regarding C# syntax highlighting at JetBrains: (project / task)

The main design inspiration is SharpLab. The syntax view feature of SharpLab is the main design that the app built upon.

Despite not applying for the internship, I wanted to finish the project and release it into a usable state without entering the depths of feature creep.

Usage

For Windows, download from the Releases page. For macOS and Linux, you have to manually compile the program (refer to the section below).

The program is designed to be cross-platform for desktop (including Windows, Linux and macOS). It's heavily tested to run on Windows 10, and it's moderately tested on Windows 11 and macOS. Please file an issue if platform-specific problems occur.

Check the change log here.

View the wiki for detailed documentation.

Compiling

To compile this program you will need an IDE like Visual Studio 2022, or JetBrains Rider 2024.1. Load the solution file (Syndiesis.sln) from the IDE of your choice and build the project (recommended to switch to Release mode).

Demo

The video was shot in version 1.1.0

https://github.com/Rekkonnect/Syndiesis/assets/8298332/268a2205-d2a4-446b-a145-5748f30f85c0

Stack

Dependencies

Features

Below is a short list of features:

  • Code editor
    • AvaloniaEdit's features
    • Syntax and semantic colorization
    • Go to definition using F12
    • Custom nagivation to outer syntax nodes based on the current selection
  • Syntax and semantic analysis visualizer
    • Current caret syntax node highlighting
    • Tree view of nodes
    • Display of property names of syntax objects
    • Colorful display of different analysis list view nodes
    • Navigation to code snippet span of selected node
    • Syntax, symbol and operation analysis
    • Indication of throwing properties per node
    • Loading nodes respects responsiveness of the app

A large portion of the app is built using basic components in Avalonia. The code editor is from AvaloniaEdit. Some icons were taken from the free version of FontAwesome.

Any issues regarding the code editor are most likely to be reported in AvaloniaEdit. This includes behavior not specific to Syndiesis. Issues will be closed if they are specific to AvaloniaEdit, and must be reported there.

Desired features

Desired features among other issues are listed in the issues.

Ruled-out features

  • Auto-complete on text

Design philosophy

The syntax visualizer should provide detailed information about how Roslyn parses the given C# code snippet, and in a pretty and user-friendly format. SharpLab lacks in readability of the tree, and it also doesn't paint the entire picture as intended.

The properties of the nodes are automatically extracted via reflection. Some are filtered out due to duplication in most cases, and in other cases they were not providing any helpful information.

Each different node type is differently treated to extract the most useful information out of it. If you encounter a node missing critical information, or displaying it weirdly, please file an issue.

With 1.1.0 onwards, the program's direction was shifted more towards explaining and visualizing the expected results by using Roslyn itself. This expands the initial scope of the program into being a handy utility making the usage of Roslyn more predictable, especially when testing analyzers or source generators.

Open Source Agenda is not affiliated with "Syndiesis" Project. README Source: Rekkonnect/Syndiesis
Stars
48
Open Issues
3
Last Commit
1 day ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating