X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2Fcompiler.doc;h=fafb61ed53163cd5f7828611552cc1b92d18fb18;hb=985fca6fd28bd88ca224ddefcf76a819e1359b41;hp=9c9eb49d9242903a8921cc054734053fa56d270e;hpb=144b21b88bf653ca6fcaa1700d784bfcfe6262b0;p=mono.git diff --git a/mcs/mcs/compiler.doc b/mcs/mcs/compiler.doc index 9c9eb49d924..fafb61ed531 100644 --- a/mcs/mcs/compiler.doc +++ b/mcs/mcs/compiler.doc @@ -87,3 +87,28 @@ The compiler has a number of phases: * Expressions +* Error reporting + + We should try to use the `Report.Error' and `Report.Warning' + classes which are part of the RootContext (there is even a + property to access it). + + Error reporting should try to use the same codes that the + Microsoft compiler uses (if only so we can track which errors + we handle and which ones we dont). + + If there is an error which is specific to MSC, use negative + numbers, and register the number in mcs/errors/errors.txt + + Try to write a test case for any error that you run into the + code of the compiler if there is none already. + + Put your test case in a file called csNNNN.cs in the + mcs/errors directory, and have the first two lines be: + + // csNNNN.cs: This is the description. + // Line: XXX + + Where `XXX' is the line where the error ocurrs. We will later + use this as a regression test suite for catching errors in the + compiler.