Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Writing Your First Visual Studio Language Service

, 11 Dec 2009 CPOL
A guide to writing a language service for Visual Studio using Irony.
CSLanguage_Service.zip
bottles-v11-long.mycs
CSLanguageService
CSLanguageService.csproj.user
Integration
Key.snk
Properties
Resources
Package.ico
Irony
Compiler
AST
Grammar
LALR
NLALR
Scanner
Terminals
TokenFilters
EditorServices
Key.snk
Microsoft
MS-PubLicense.Rtf
Properties
Runtime
IronyLanguageServicePackage.zip
Integration
Key.snk
MyTemplate.vstemplate
Properties
Resources
Irony.dll
Irony.GrammarExplorer.exe
__TemplateIcon.ico
IronyLanguageServiceTemplate.zip
IronyLanguageServicePackage.zip
IronyLanguageServiceWizard.dll
Wizard.dll
MyCLanguageService.zip
MyCLanguageService
MyCLanguageService
bin
Debug
Irony.dll
Irony.GrammarExplorer.exe
MyCLanguageService.dll
MyCLanguageService.pkgdef
Integration
Key.snk
MyCLanguageService.csproj.user
Properties
Resources
Irony.dll
Irony.GrammarExplorer.exe
Test Files
short.myc
thing.myc
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace Irony.Integration
{
    /*
     * The Babel.LanguageService class is needed to register the VS language service.  
     * This class derives from the Babel.BabelLanguageService base class which provides all the necessary 
     * functionality for a babel-based language service.  This class can be used to override and extend that 
     * base class if necessary.
     * 
     * Note that the Babel.BabelLanguageService class derives from the Managed 
     * Package Framework's LanguageService class.
     *     
     * Of special interest is the GUID attribute that is used to uniquely identify this language service.  
     * If this code is copied for a different language service, then the GUID should be regenerated
     * so to not interfere with this sample language service's GUID.
     */

    [ComVisible(true)]
    [Guid(GuidList.guidCSLanguageServiceString)]
    public class LanguageService : IronyLanguageService
    {
        
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Ben Morrison
Software Developer
United States United States
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150414.1 | Last Updated 11 Dec 2009
Article Copyright 2009 by Ben Morrison
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid