예제 #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;
 }