[SVN] Re: Language within a language
Michael Sheets
mummer at whitefalls.org
Mon May 18 00:42:01 UTC 2009
On May 16, 2009, at 1:55 PM, Martin Hess wrote:
> What is the best approach for supporting a language within a language.
>
> For example, in some languages you can embed inline assembly or C
> code.
>
> You could extend the bundle for the primary language to support the
> syntax and completions of the embed language, but that seems a bit
> redundant.
>
> Is there a way to use an existing language bundle within another
> bundle? Are there any examples of this?
http://manual.macromates.com/en/language_grammars#language_rules
Look at the include rule key there. There are plenty of examples of
this, CSS embedded in HTML for instance. Open the HTML grammar in the
bundle editor to see how it's done.
More information about the textmate-dev
mailing list