DialectService

public class DialectService implements IDialectService

Default implementation for the dialect service. It is mostly generic, but contains some logic for .meta files, which are Spoofax-specific. A dialect is simply a language implementation, with a single component, that mimics its base language, but has a different name and a few different facets. Dialects are created by copying over all facets from a language implementation into a new language implementation, except that:

Constructors

DialectService

public DialectService(ILanguageService languageService)

Methods

add

public ILanguageImpl add(String name, FileObject location, ILanguageImpl base, IFacet syntaxFacet)

dialectName

public String dialectName(ILanguageImpl dialect)

getBase

public ILanguageImpl getBase(ILanguageImpl dialect)

getDialect

public ILanguageImpl getDialect(String name)

getDialects

public Iterable<ILanguageImpl> getDialects(ILanguageImpl base)

hasDialect

public boolean hasDialect(String name)

remove

public ILanguageImpl remove(String name)

remove

public Iterable<ILanguageImpl> remove(ILanguageImpl base)

update

public ILanguageImpl update(String name, IFacet syntaxFacet)

update

public Iterable<ILanguageImpl> update(ILanguageImpl base)