walnuthq / cairovm.codes

Source code for cairovm.codes — a web app to compile Cairo programs into Sierra and CASM with step-through execution capabilities.
https://cairovm.codes
MIT License
30 stars 24 forks source link

feat: Implement Step-by-Step Cairo Code Highlighting - Issue #124 #131

Closed melnikga closed 6 months ago

melnikga commented 6 months ago

To solve this problem, I decided to change the code editor, because sceditor is difficult to modify. I chose Monaco Editor as the new code editor, it already has built-in functions for highlighting lines. Moreover, this is the best solution if you want to add new features to the editor in the future.

melnikga commented 6 months ago

Due to the fact that the monaco editor does not support the Cairo 1 syntax, and in principle there is no library that would provide the opportunity to add Cairo to monaco, I decided to write my own config file to add a custom language. I think this is the most optimal solution at the moment, as it makes it possible to customize the language according to its development and not depend on a third-party library, which may not be updated for a long time.