How to create a new language for use in Visual Studio

前端 未结 7 1885
礼貌的吻别
礼貌的吻别 2020-11-28 17:42

I want to write a new templating language, and I want Visual Studio to \"support\" it. What I need to know is:

  1. How do I parse my new language?
7条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-28 18:36

    I would take a look at another language that has already done the legwork of integrating with Visual Studio. A great example is Boo. The language and Visual Studio integration are open source. So you can take a look at exactly what they had to do.

    • Boo Language: https://github.com/boo/boo-lang
    • Boo Syntax Highlighting for VS2010 (VSX add-in): http://vs2010boo.codeplex.com/
    • Boo Language Studio (syntax highlighting for VS2008): http://boolangstudio.codeplex.com/

    The Boo Syntax Highlighting for VS2010 includes some recommended links on its homepage, which I'll copy for easy reference:

    • Nice article about "classification" (syntax highligting) in VS 2010: http://dotneteers.net/blogs/divedeeper/archive/2008/11/04/LearnVSXNowPart38.aspx
    • Examples for VSX add-ins: http://blogs.msdn.com/vsxteam/archive/2009/06/17/new-editor-samples-for-visual-studio-2010-beta-1.aspx

提交回复
热议问题