Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
TokenEditorInfo.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.Linq;
16 using System.Text;
17 
18 namespace Irony.Parsing {
19  // Helper classes for information used by syntax highlighters and editors
20  // TokenColor, TokenTriggers and TokenType are copied from the Visual studio integration assemblies.
21  // Each terminal/token would have its TokenEditorInfo that can be used either by VS integration package
22  // or any editor for syntax highligting.
23 
24  public class TokenEditorInfo {
25  public readonly TokenType Type;
26  public readonly TokenColor Color;
27  public readonly TokenTriggers Triggers;
28  public string ToolTip;
29  public int UnderlineType;
30  public TokenEditorInfo(TokenType type, TokenColor color, TokenTriggers triggers) {
31  Type = type;
32  Color = color;
33  Triggers = triggers;
34  }
35 
36  }//class
37 
38  public enum TokenColor {
39  Text = 0,
40  Keyword = 1,
41  Comment = 2,
42  Identifier = 3,
43  String = 4,
44  Number = 5,
45  }
46 
47  // (Comments are coming from visual studio integration package)
48  // Specifies a set of triggers that can be fired from an Microsoft.VisualStudio.Package.IScanner
49  // language parser.
50  [Flags]
51  public enum TokenTriggers {
52  // Summary:
53  // Used when no triggers are set. This is the default.
54  None = 0,
55  //
56  // Summary:
57  // A character that indicates that the start of a member selection has been
58  // parsed. In C#, this could be a period following a class name. In XML, this
59  // could be a < (the member select is a list of possible tags).
60  MemberSelect = 1,
61  //
62  // Summary:
63  // The opening or closing part of a language pair has been parsed. For example,
64  // in C#, a { or } has been parsed. In XML, a < or > has been parsed.
65  MatchBraces = 2,
66  //
67  // Summary:
68  // A character that marks the start of a parameter list has been parsed. For
69  // example, in C#, this could be an open parenthesis, "(".
70  ParameterStart = 16,
71  //
72  // Summary:
73  // A character that separates parameters in a list has been parsed. For example,
74  // in C#, this could be a comma, ",".
75  ParameterNext = 32,
76  //
77  // Summary:
78  // A character that marks the end of a parameter list has been parsed. For example,
79  // in C#, this could be a close parenthesis, ")".
80  ParameterEnd = 64,
81  //
82  // Summary:
83  // A parameter in a method's parameter list has been parsed.
84  Parameter = 128,
85  //
86  // Summary:
87  // This is a mask for the flags used to govern the IntelliSense Method Tip operation.
88  // This mask is used to isolate the values Microsoft.VisualStudio.Package.TokenTriggers.Parameter,
89  // Microsoft.VisualStudio.Package.TokenTriggers.ParameterStart, Microsoft.VisualStudio.Package.TokenTriggers.ParameterNext,
90  // and Microsoft.VisualStudio.Package.TokenTriggers.ParameterEnd.
91  MethodTip = 240,
92  }
93 
94  public enum TokenType {
95  Unknown = 0,
96  Text = 1,
97  Keyword = 2,
98  Identifier = 3,
99  String = 4,
100  Literal = 5,
101  Operator = 6,
102  Delimiter = 7,
103  WhiteSpace = 8,
104  LineComment = 9,
105  Comment = 10,
106  }
107 
108 }
Flags
Enumeration of the new Assimp's flags.
SiliconStudio.Core.Mathematics.Color Color
Definition: ColorPicker.cs:14
Comment category.
readonly TokenTriggers Triggers
TokenEditorInfo(TokenType type, TokenColor color, TokenTriggers triggers)