Class LJSCompiler
Compiles templates based of text files that use Laconic Java Script language syntax. Note: This compiler supersedes TextJSTemplateCompiler
Implements
System.IDisposable
System.Collections.Generic.IEnumerable<CompileUnit>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Azos.Templatization
Assembly: Azos.dll
Syntax
public class LJSCompiler : TemplateCompiler, IDisposable, IConfigurable, IEnumerable<CompileUnit>, IEnumerable
Examples
/***@ relative-include-file-path ***/
function() {
/***
div=idName{ //comment
attr1=value1
attr2=value2 attr3="value 3"
# //java script block
# let x = 0;
span{literal content of span}
}
***/
}
Constructors
LJSCompiler()
Declaration
public LJSCompiler()
LJSCompiler(ITemplateSource<String>[])
Declaration
public LJSCompiler(params ITemplateSource<string>[] sources)
Parameters
Type | Name | Description |
---|---|---|
ITemplateSource<System.String>[] | sources |
LJSCompiler(IEnumerable<ITemplateSource<String>>)
Declaration
public LJSCompiler(IEnumerable<ITemplateSource<string>> sources)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ITemplateSource<System.String>> | sources |
Fields
RX_BLOCK_FRAGMENT
Block content fragment: /*** content ***/
Declaration
public static readonly Regex RX_BLOCK_FRAGMENT
Field Value
Type | Description |
---|---|
System.Text.RegularExpressions.Regex |
RX_FILE_INCLUDE
Include files: /***@ path ***/
Declaration
public static readonly Regex RX_FILE_INCLUDE
Field Value
Type | Description |
---|---|
System.Text.RegularExpressions.Regex |
Properties
LanguageName
Declaration
public override string LanguageName { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
LanguageSourceFileExtension
Declaration
public override string LanguageSourceFileExtension { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
TranspilerConfig
Declaration
[Config("trans|transpiler|config|conf")]
public IConfigSectionNode TranspilerConfig { get; set; }
Property Value
Type | Description |
---|---|
IConfigSectionNode |
Methods
DoCompileCode()
Declaration
protected override void DoCompileCode()
Overrides
DoCompileTemplateSource(CompileUnit)
Declaration
protected override void DoCompileTemplateSource(CompileUnit unit)
Parameters
Type | Name | Description |
---|---|---|
CompileUnit | unit |
Overrides
Implements
System.IDisposable
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable