Class LJSUnitTranspilationContext
Represents a scope of LJS unit transpilation (such as a file). The transpilation is done
fragment-by-fragment, where every fragment is excised from the JS file
Inheritance
System.Object
LJSUnitTranspilationContext
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()
Assembly: Azos.dll
Syntax
public class LJSUnitTranspilationContext : CommonCodeProcessor, IConfigurable, IAnalysisContext, ICodeProcessor
Constructors
LJSUnitTranspilationContext(String)
Declaration
public LJSUnitTranspilationContext(string unitName)
Parameters
Type |
Name |
Description |
System.String |
unitName |
|
LJSUnitTranspilationContext(String, IAnalysisContext, MessageList, Boolean)
Declaration
public LJSUnitTranspilationContext(string unitName, IAnalysisContext context = null, MessageList messages = null, bool throwErrors = false)
Parameters
Fields
DEFAULT_ID_PREFIX
Declaration
public const string DEFAULT_ID_PREFIX = "æ"
Field Value
Type |
Description |
System.String |
|
DEFAULT_INDENT
Declaration
public const int DEFAULT_INDENT = 2
Field Value
Type |
Description |
System.Int32 |
|
WV_DOM_PREFIX
Declaration
public const string WV_DOM_PREFIX = "$d"
Field Value
Type |
Description |
System.String |
|
WV_TYPE_PREFIX
Declaration
public const string WV_TYPE_PREFIX = "$t"
Field Value
Type |
Description |
System.String |
|
Properties
DomPrefix
Defines prefix for Waev.DOM module which provides shortcuts for createElement(), getElement byid etc...
Declaration
[Config]
public string DomPrefix { get; set; }
Property Value
Type |
Description |
System.String |
|
IdPrefix
Defines prefix for ids generated by transpiler
Declaration
[Config]
public string IdPrefix { get; set; }
Property Value
Type |
Description |
System.String |
|
IndentWidth
Declaration
[Config(Default = 2)]
public int IndentWidth { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Language
Declaration
public override Language Language { get; }
Property Value
Overrides
TranspilerConfig
Declaration
[Config("trans|transpiler")]
public IConfigSectionNode TranspilerConfig { get; set; }
Property Value
TypePrefix
Defines prefix for Waev.TYPE module
Declaration
[Config]
public string TypePrefix { get; set; }
Property Value
Type |
Description |
System.String |
|
UnitName
Returns the name of the current unit which is being transpiled
Declaration
public string UnitName { get; }
Property Value
Type |
Description |
System.String |
|
Methods
GenerateID()
Generates unique ID per this instance
Declaration
public string GenerateID()
Returns
Type |
Description |
System.String |
|
MakeAndConfigureTranspiler(LJSParser)
Factory method that makes new configured instance of transpiler per supplied configuration
Declaration
public virtual LJSFragmentTranspiler MakeAndConfigureTranspiler(LJSParser parser)
Parameters
Returns
MessageCodeToString(Int32)
Declaration
public override string MessageCodeToString(int code)
Parameters
Type |
Name |
Description |
System.Int32 |
code |
|
Returns
Type |
Description |
System.String |
|
Overrides
TranspileFragmentToString(ISourceText)
Helper facade that assembles processing pipeline and transpiles an LJS fragment into a string
within this unit context
Declaration
public string TranspileFragmentToString(ISourceText source)
Parameters
Returns
Type |
Description |
System.String |
|
Implements
Extension Methods