2
using System.Collections.Generic;
6
namespace Irony.Compiler {
7
// Initial implementation of syntax highlighting in editor.
8
// TokenColor, TokenTriggers and TokenType are copied from the Visual studio integration assemblies.
9
// Each terminal/token would have its TokenEditorInfo that can be used either by VS integration package
10
// or any editor for syntax highligting.
12
public class TokenEditorInfo {
13
public readonly TokenType Type;
14
public readonly TokenColor Color;
15
public readonly TokenTriggers Triggers;
16
public TokenEditorInfo(TokenType type, TokenColor color, TokenTriggers triggers) {
24
public enum TokenColor {
33
// (Comments are coming from visual studio integration package)
34
// Specifies a set of triggers that can be fired from an Microsoft.VisualStudio.Package.IScanner
37
public enum TokenTriggers {
39
// Used when no triggers are set. This is the default.
43
// A character that indicates that the start of a member selection has been
44
// parsed. In C#, this could be a period following a class name. In XML, this
45
// could be a < (the member select is a list of possible tags).
49
// The opening or closing part of a language pair has been parsed. For example,
50
// in C#, a { or } has been parsed. In XML, a < or > has been parsed.
54
// A character that marks the start of a parameter list has been parsed. For
55
// example, in C#, this could be an open parenthesis, "(".
59
// A character that separates parameters in a list has been parsed. For example,
60
// in C#, this could be a comma, ",".
64
// A character that marks the end of a parameter list has been parsed. For example,
65
// in C#, this could be a close parenthesis, ")".
69
// A parameter in a method's parameter list has been parsed.
73
// This is a mask for the flags used to govern the IntelliSense Method Tip operation.
74
// This mask is used to isolate the values Microsoft.VisualStudio.Package.TokenTriggers.Parameter,
75
// Microsoft.VisualStudio.Package.TokenTriggers.ParameterStart, Microsoft.VisualStudio.Package.TokenTriggers.ParameterNext,
76
// and Microsoft.VisualStudio.Package.TokenTriggers.ParameterEnd.
80
public enum TokenType {