public override void ErrorReported(ScriptSource source, string message, Microsoft.Scripting.SourceSpan span, int errorCode, Microsoft.Scripting.Severity severity)
 {
     Message   = message;
     ErrorCode = errorCode;
     sev       = severity;
     Span      = span;
 }
Exemplo n.º 2
0
 public override void ErrorReported(
     ScriptSource source,
     string message,
     Microsoft.Scripting.SourceSpan span,
     int errorCode,
     Microsoft.Scripting.Severity severity
     )
 {
     Errors.Add(new ProgramError()
     {
         Line         = span.Start.Line,
         Column       = span.Start.Column,
         ErrorMessage = message,
         ErrorNumber  = errorCode.ToString(),
         CodeBlock    = blockType
     });
 }
Exemplo n.º 3
0
        /// <summary>
        ///     Convert severity enum
        /// </summary>
        internal static Severity ToSeverity(Microsoft.Scripting.Severity severity)
        {
            switch (severity)
            {
            case Microsoft.Scripting.Severity.Ignore:
                return(Severity.Info);

            case Microsoft.Scripting.Severity.Warning:
                return(Severity.Warning);

            case Microsoft.Scripting.Severity.Error:
            case Microsoft.Scripting.Severity.FatalError:
                return(Severity.Error);

            default:
                throw new Exception("Severity not found!");
            }
        }
Exemplo n.º 4
0
 public override void Add(string message, string path, string code, string line, Microsoft.Scripting.SourceSpan span, int errorCode, Microsoft.Scripting.Severity severity)
 {
     Add(message, span);
 }
Exemplo n.º 5
0
 public override void Add(Microsoft.Scripting.SourceUnit source, string message, Microsoft.Scripting.SourceSpan span, int errorCode, Microsoft.Scripting.Severity severity)
 {
     Add(message, span);
 }