Skip to content
Marcus edited this page Oct 28, 2015 · 5 revisions

The #pragma directive is akin to an xml processing instruction in that it is to be interpreted by the parser or caller thereof.


Syntax

$$#pragma string /$$
  • May be empty: yes
  • May be nested: no

Here string can be any string that can be interpreted by the parser or caller. This can be done by hooking the PragmaSeen event of the TemplateParser and then parse the given string.

For more info see Pragmas.

Example

The file processor (provided in the Jefferson.FileProcessing) supports the dontprocess and once pragmas which directs the processor not to perform any processing on a given file, e.g.

<!-- $$#pragma dontprocess /$$ -->
<root>
   <foo name="$$bar$$" />
</root>
<!-- $$#pragma once /$$ -->
<root>
   $$#literal$$
      Output $$ here. $$ foo $$ is not evaluated.
   $$/literal$$
</root>
Clone this wiki locally