예제 #1
0
 private void AddError(int errorId, SourceSpan errorPosition, params object[] args)
 {
     if (m_errorList != null)
     {
         m_errorList.AddError(errorId, errorPosition, args);
     }
 }
예제 #2
0
        public void AddError(int id, SourceSpan errorPosition, params object[] args)
        {
            CodeContract.RequiresArgumentInRange(m_errorInfoStore.Contains(id), "id", "Error id is invalid");

            var errorInfo = m_errorInfoStore[id];
            var errorMessage = String.Format(errorInfo.MessageTemplate, args);

            m_errors.Add(new CompilationError(errorInfo, errorPosition, errorMessage));
        }
예제 #3
0
 public CompilationError(CompilationErrorInfo errorInfo, SourceSpan errorPosition, string errorMessage)
 {
     Info = errorInfo;
     ErrorPosition = errorPosition;
     Message = errorMessage;
 }
예제 #4
0
 public SyntaxError(int code, string description, SourceSpan location)
 {
     Code = code;
     Description = description;
     Location = location;
 }