Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ParserMessage.cs
Go to the documentation of this file.
1 #region License
2 /* **********************************************************************************
3  * Copyright (c) Roman Ivantsov
4  * This source code is subject to terms and conditions of the MIT License
5  * for Irony. A copy of the license can be found in the License.txt file
6  * at the root of this distribution.
7  * By using this source code in any fashion, you are agreeing to be bound by the terms of the
8  * MIT License.
9  * You must not remove this notice from this software.
10  * **********************************************************************************/
11 #endregion
12 
13 using System;
14 using System.Collections.Generic;
15 using System.Text;
16 
17 namespace Irony.Parsing {
18 
19  public enum ParserErrorLevel {
20  Info = 0,
21  Warning = 1,
22  Error = 2,
23  }
24 
25  //Container for syntax errors and warnings
26  public class ParserMessage {
27  public ParserMessage(ParserErrorLevel level, SourceLocation location, string message, ParserState parserState) {
28  Level = level;
29  Location = location;
30  Message = message;
31  ParserState = parserState;
32  }
33 
34  public readonly ParserErrorLevel Level;
35  public readonly ParserState ParserState;
36  public readonly SourceLocation Location;
37  public readonly string Message;
38 
39  public override string ToString() {
40  return Message;
41  }
42  }//class
43 
44  public class ParserMessageList : List<ParserMessage> {
45  public static int ByLocation(ParserMessage x, ParserMessage y) {
46  return SourceLocation.Compare(x.Location, y.Location);
47  }
48  }
49 
50 }//namespace
readonly ParserErrorLevel Level
readonly SourceLocation Location
_In_ size_t _In_ DXGI_FORMAT _In_ size_t _In_ float size_t y
Definition: DirectXTexP.h:191
static int ByLocation(ParserMessage x, ParserMessage y)
override string ToString()
ParserMessage(ParserErrorLevel level, SourceLocation location, string message, ParserState parserState)
readonly ParserState ParserState