public override ParseErrorExpression BuildTrigger(TriggerBuilderContext context, InterpreterScope scope, FunctionCallExpression functionCall) { var accessor = (FunctionCallExpression)functionCall.Parameters.First(); var error = context.CallFunction(accessor, scope); if (error != null) { return(error); } var left = context.LastRequirement.Left; context.LastRequirement.Left = new Field { Size = left.Size, Type = _fieldType, Value = left.Value }; return(null); }
public override ParseErrorExpression BuildTrigger(TriggerBuilderContext context, InterpreterScope scope, FunctionCallExpression functionCall) { var accessor = (FunctionCallExpression)functionCall.Parameters.First(); var error = context.CallFunction(accessor, scope); if (error != null) { return(error); } var left = context.LastRequirement.Left; if (left.Type != FieldType.MemoryAddress) { return(new ParseErrorExpression("cannot apply multiple modifiers to memory accessor", functionCall)); } context.LastRequirement.Left = new Field { Size = left.Size, Type = _fieldType, Value = left.Value }; return(null); }