public RelinqScriptParser(String relinqScriptCode, IntegrationContext integration) { RelinqScriptCode = relinqScriptCode; Integration = integration; _rules.Add(t => t.Text == "PAREXPR", ParseParentheses); _rules.Add(t => t.Text == "CALL", ParseCall); _rules.Add(t => t.Text == "BYINDEX", ParseByIndex); _rules.Add(t => t.Text == "BYFIELD", ParseByField); _rules.Add(t => t.Text == "function", ParseFunctionDefinition); _rules.Add(t => EcmaScriptV3Syntax.IsObject(t.Token), ParseObjectInitializer); _rules.Add(t => EcmaScriptV3Syntax.IsArray(t.Token), ParseArrayInitializer); _rules.Add(t => OperatorsReference.IsOperator(t.Text), ParseOperator); _rules.Add(t => t.Children.Count == 0 && !EcmaScriptV3Syntax.IsKeyword(t.Token) && integration.IsRegisteredJS(t.Text), t => new KeywordExpression(t.Text)); _rules.Add(t => t.Children.Count == 0 && !integration.IsRegisteredJS(t.Text) && EcmaScriptV3Syntax.IsIdentifier(t.Token), t => new VariableExpression(t.Text)); _rules.Add(t => t.Children.Count == 0 && !integration.IsRegisteredJS(t.Text) && EcmaScriptV3Syntax.IsLiteral(t.Token), t => new ConstantExpression(t.Token)); }
public TypeInferenceContext(RelinqScriptExpression root, TypeInferenceCache inferences, IntegrationContext integration) { Root = root; // ctx.Root might only be one of the following: // * Invoke expression (for both cases of compile-time and late-bound invocation) // * Indexer or Operator expression // * Root of an entire AST if (Root.Parent != null && !Root.IsCall()) { throw new NotSupportedException(root.ToString()); } Inferences = inferences; Integration = integration; }
protected IntegrationException(IntegrationExceptionType type, IntegrationContext ctx, Exception innerException) : base(innerException) { Type = type; Context = ctx; }
public TypeInferenceEngine(RelinqScriptExpression ast, IntegrationContext integration) { Ctx = new TypeInferenceContext(ast, new TypeInferenceCache(), integration); }
public RelinqScriptCompiler(IntegrationContext integration) { Integration = integration; }
public TransformationFramework() { Integration = new IntegrationContext(); }
public JSToCSharpIntegrationException(IntegrationExceptionType type, IntegrationContext ctx, String jsVariable, Exception innerException) : base(type, ctx, innerException) { JSVariable = jsVariable; }
public JSToCSharpIntegrationException(IntegrationExceptionType type, IntegrationContext ctx, String jsVariable) : this(type, ctx, jsVariable, null) { }
public CSharpToJSIntegrationException(IntegrationExceptionType type, IntegrationContext ctx, Object csharpObject, Exception innerException) : base(type, ctx, innerException) { CSharpObject = csharpObject; }
public CSharpToJSIntegrationException(IntegrationExceptionType type, IntegrationContext ctx, Object csharpObject) : this(type, ctx, csharpObject, null) { }
public CSharpExpressionTreeBuilder(RelinqScriptExpression ast, IntegrationContext integration) { Ast = ast; Integration = integration; }