Пример #1
0
 protected Binder(Type objectType, Type delegateType, MacroOptions options)
 {
     Debug.Assert(delegateType.IsSubclassOf(typeof(Delegate)));
     BuildIndex();
     ObjectType   = FindType(objectType);
     DelegateType = delegateType;
     Options      = options;
 }
Пример #2
0
 protected Binder(Type objectType, Type delegateType, MacroOptions options)
 {
     Debug.Assert(delegateType.IsSubclassOf(typeof(Delegate)));
     BuildIndex();
     AppDomain.CurrentDomain.AssemblyLoad += AssemblyLoadEventHandler;
     ObjectType       = FindType(objectType);
     DelegateType     = delegateType;
     Options          = options;
     NestedCodeblocks = null;
 }
Пример #3
0
 internal Lexer(string source, MacroOptions options)
 {
     _Source  = source;
     _options = options;
 }
Пример #4
0
 internal static Binder <T, R> Create <T, R>(MacroOptions options) where R : class
 {
     return(new Binder <T, R>(options));
 }
Пример #5
0
 public static Compilation <T, R> Create <T, R>(MacroOptions options = null) where R : class
 {
     return(new Compilation <T, R>(options ?? MacroOptions.Default));
 }
Пример #6
0
 public static Compilation <T, Func <T[], T> > Create <T>(MacroOptions options = null)
 {
     return(new Compilation <T, Func <T[], T> >(options ?? MacroOptions.Default));
 }
Пример #7
0
 internal Parser(Lexer lexer, MacroOptions options)
 {
     _Lexer   = lexer;
     _Input   = lexer.AllTokens();
     _options = options;
 }
Пример #8
0
 public static Compilation<T, R> Create<T, R>(MacroOptions options = null) where R: Delegate
 {
     if (options?.ParseStatements == true)
         return new ScriptCompilation<T, R>(options);
     return new Compilation<T, R>(options ?? MacroOptions.Default);
 }
Пример #9
0
 public static Compilation<T, Func<T[], T>> Create<T>(MacroOptions options = null)
 {
     if (options?.ParseStatements == true)
         return new ScriptCompilation<T, Func<T[], T>>(options);
     return new Compilation<T, Func<T[], T>>(options ?? MacroOptions.Default);
 }
Пример #10
0
 internal Parser(IList <Token> input, MacroOptions options)
 {
     _Input   = input;
     _options = options;
 }