public virtual void WriteCompileError(string traceMsg) { string objectName = GetType().Name; traceMsg = string.Format(traceMsg, objectName, string.IsNullOrEmpty(Name) ? objectName : Name); CompilerErrors.Add(traceMsg); WriteOutput(traceMsg); }
public override bool Compile() { base.Compile(); Actions.ForEach(c => { c.Compile(); c.CompilerErrors.ToList().ForEach(d => CompilerErrors.Add(d)); }); return(IsCompiled); }
public override void SyntaxError( IRecognizer recognizer, IToken offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) { CompilerErrors.Add( new CompilerError { Column = charPositionInLine, Line = line, Message = msg, Exception = e }); Console.WriteLine($"[{line}/{charPositionInLine}] - {msg}"); }
public override bool Compile() { base.Compile(); foreach (ServiceActionInput sai in ServiceActionInputs) { sai.Compile(); sai.CompilerErrors.ToList().ForEach(c => CompilerErrors.Add(c)); } if (CompilerErrors.Count > 0) { return(IsCompiled); } switch (ActionType) { case enActionType.InvokeDynamicService: if (string.IsNullOrEmpty(ServiceName)) { WriteCompileError(Resources.CompilerError_MissingServiceName); } break; case enActionType.Workflow: break; default: //A Source Name is required except in the case of Management Dynamic Services if (string.IsNullOrEmpty(SourceName) && ActionType != enActionType.InvokeManagementDynamicService) { WriteCompileError(Resources.CompilerError_MissingSourceName); } if (string.IsNullOrEmpty(SourceMethod)) { WriteCompileError(Resources.CompilerError_MissingSourceMethod); } //A source is required except in the case of Management Dynamic Services if (Source == null && ActionType != enActionType.InvokeManagementDynamicService) { WriteCompileError(Resources.CompilerError_SourceNotFound); } break; } return(IsCompiled); }
public override bool Compile() { base.Compile(); if (string.IsNullOrEmpty(Source)) { WriteCompileError(Resources.CompilerError_SourceNotFound); } Validators.ForEach(c => { c.Compile(); c.CompilerErrors.ToList().ForEach(d => CompilerErrors.Add(d)); }); return(IsCompiled); }
/// <summary> /// Compiles this object /// </summary> /// <returns></returns> public override bool Compile() { base.Compile(); if (Actions.Count == 0) { WriteCompileError(Resources.CompilerError_ServiceHasNoActions); } Actions.ForEach(c => { c.Compile(); c.CompilerErrors.ToList().ForEach(d => CompilerErrors.Add(d)); }); return(IsCompiled); }
public void GenericArgumentsCountMismatch(Node anchor, IType type) { CompilerErrors.Add(CompilerErrorFactory.GenericDefinitionArgumentCount(anchor, type.FullName, type.GenericInfo.GenericParameters.Length)); }