source: trunk/yao/share/antlr-2.7.7/lib/csharp/antlr.runtime/antlr.debug/MessageEventArgs.cs @ 1

Last change on this file since 1 was 1, checked in by lnalod, 15 years ago

Initial import of YAO sources

File size: 746 bytes
Line 
1namespace antlr.debug
2{
3        using System;
4       
5        public class MessageEventArgs : ANTLREventArgs
6        {
7                public MessageEventArgs()
8                {
9                }
10                public MessageEventArgs(int type, string text)
11                {
12                        setValues(type, text);
13                }
14
15                public virtual string Text
16                {
17                        get     { return text_;                 }
18                        set     { this.text_ = value;   }
19                       
20                }
21
22                private string text_;
23
24                public static int WARNING = 0;
25                public static int ERROR = 1;
26               
27               
28                /// <summary>This should NOT be called from anyone other than ParserEventSupport!
29                /// </summary>
30                internal void  setValues(int type, string text)
31                {
32                        setValues(type);
33                        this.Text   = text;
34                }
35
36                public override string ToString()
37                {
38                        return "ParserMessageEvent [" + (Type == WARNING?"warning,":"error,") + Text + "]";
39                }
40        }
41}
Note: See TracBrowser for help on using the repository browser.