~ubuntu-branches/ubuntu/feisty/monodevelop/feisty

« back to all changes in this revision

Viewing changes to Extras/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Errors.cs

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2006-08-18 00:51:23 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060818005123-5iit07y0j7wjg55f
Tags: 0.11+svn20060818-0ubuntu1
* New SVN snapshot
  + Works with Gtk# 2.9.0
* debian/control:
  + Updated Build-Depends
* debian/patches/use_nunit2.2.dpatch,
  debian/patches/use_real_libs.dpatch:
  + Updated
* debian/patches/versioncontrol_buildfix.dpatch:
  + Fix build failure in the version control addin

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
using System;
2
 
using System.Text;
3
 
 
4
 
namespace ICSharpCode.SharpRefactory.Parser.VB
5
 
{
6
 
        public delegate void ErrorCodeProc(int line, int col, int n);
7
 
        public delegate void ErrorMsgProc(int line, int col, string msg);
8
 
        
9
 
        public class Errors
10
 
        {
11
 
                public int count = 0;                                               // number of errors detected
12
 
                public ErrorCodeProc SynErr;
13
 
                public ErrorCodeProc SemErr;
14
 
                public ErrorMsgProc  Error;
15
 
                StringBuilder errorText = new StringBuilder();
16
 
                
17
 
                public string ErrorOutput {
18
 
                        get {
19
 
                                return errorText.ToString();
20
 
                        }
21
 
                }
22
 
                public Errors()
23
 
                {
24
 
                        SynErr = new ErrorCodeProc(DefaultCodeError);  // syntactic errors
25
 
                        SemErr = new ErrorCodeProc(DefaultCodeError);  // semantic errors
26
 
                        Error  = new ErrorMsgProc(DefaultMsgError);    // user defined string based errors
27
 
                }
28
 
                
29
 
        //      public void Exception (string s)
30
 
        //      {
31
 
        //              Console.WriteLine(s); 
32
 
        //              System.Environment.Exit(0);
33
 
        //      }
34
 
        
35
 
                void DefaultCodeError (int line, int col, int n)
36
 
                {
37
 
                        errorText.Append(String.Format("-- line {0} col {1}: error {2}", line, col, n));
38
 
                        errorText.Append("\n");
39
 
                        count++;
40
 
                }
41
 
        
42
 
                void DefaultMsgError (int line, int col, string s) {
43
 
                        errorText.Append(String.Format("-- line {0} col {1}: {2}", line, col, s));
44
 
                        errorText.Append("\n");
45
 
                        count++;
46
 
                }
47
 
        } // Errors
48
 
}