当前位置: 首页>>代码示例>>C#>>正文


C# TokenType类代码示例

本文整理汇总了C#中TokenType的典型用法代码示例。如果您正苦于以下问题:C# TokenType类的具体用法?C# TokenType怎么用?C# TokenType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TokenType类属于命名空间,在下文中一共展示了TokenType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RegexLexerContext

 /// <summary>
 /// Initializes a new isntance of the <see cref="RegexLexerContext"/> class
 /// </summary>
 /// <param name="position">the position into the source file</param>
 /// <param name="match">the regular expression match data</param>
 /// <param name="stateStack">The stack of states</param>
 /// <param name="ruleTokenType">The token type the rule specified to emit</param>
 public RegexLexerContext(int position, Match match, Stack<string> stateStack, TokenType ruleTokenType)
 {
     Position = position;
     Match = match;
     StateStack = stateStack;
     RuleTokenType = ruleTokenType;
 }
开发者ID:akatakritos,项目名称:PygmentSharp,代码行数:14,代码来源:RegexLexer.cs

示例2: VxSqlToken

    public VxSqlToken(TokenType t, string n, string l)
    {
	type = t;
	name = n;
	leading_space = l;
	trailing_space = "";
    }
开发者ID:apenwarr,项目名称:versaplex,代码行数:7,代码来源:vxsqltokenizer.cs

示例3: Token

 public Token(TokenType type, string text, int offset, int length)
 {
     m_Type = type;
     m_Text = text;
     m_Offset = offset;
     m_Length = length;
 }
开发者ID:alfar,项目名称:WordBuilder,代码行数:7,代码来源:Token.cs

示例4: Equals

        public bool Equals(TokenType tokenType, string value)
        {
            Debug.Assert(Enum.IsDefined(typeof(TokenType), tokenType));
            Debug.Assert(value != null);

            return (this.type == tokenType) && string.Equals(this.value, value, StringComparison.Ordinal);
        }
开发者ID:davidlblake,项目名称:WPFConverters,代码行数:7,代码来源:Token.cs

示例5: Token

 public Token(TokenType type, string text, int start, int length)
 {
     this.type = type;
     this.text = text;
     this.start = start;
     this.length = length;
 }
开发者ID:ajlopez,项目名称:Acquarella,代码行数:7,代码来源:Token.cs

示例6: GetOperatorType

 internal static OperatorType GetOperatorType(TokenType type)
 {
     if (type == TokenType.OP_UMINUS) return OperatorType.UNARY;
     if (type == TokenType.OP_UPLUS) return OperatorType.UNARY;
     if (type == TokenType.OP_UNOT) return OperatorType.UNARY;
     return OperatorType.BINARY;
 }
开发者ID:sekcheong,项目名称:graphdemo,代码行数:7,代码来源:Lexer.cs

示例7: UnaryExpression

        public UnaryExpression(TokenType op, Expression operand)
        {
            if (operand != null)
                AddChild (operand, OperandRole);

            Operator = op;
        }
开发者ID:yudhitech,项目名称:xamarin-macios,代码行数:7,代码来源:UnaryExpression.cs

示例8: BinaryExpression

 public BinaryExpression(int line, int column, Expression lhs, TokenType op, Expression rhs)
     : base(line, column)
 {
     this.lhs = lhs;
     this.op = op;
     this.rhs = rhs;
 }
开发者ID:jordan49,项目名称:websitepanel,代码行数:7,代码来源:BinaryExpression.cs

示例9: DiscardToken

        private void DiscardToken(TokenType tokenType)
        {
            if (_lookaheadFirst.TokenType != tokenType)
                throw new LqlParserException(string.Format("Expected {0} but found: {1}", tokenType.ToString().ToUpper(), _lookaheadFirst.Value));

            DiscardToken();
        }
开发者ID:Vanlightly,项目名称:Logari,代码行数:7,代码来源:LqlParser.cs

示例10: MonadicExpression

 protected MonadicExpression(TextPosition tp, TokenType op, Element exp)
     : base(tp)
 {
     Operator = op;
     Exp = exp;
     AppendChild(Exp);
 }
开发者ID:B-head,项目名称:Dreit-prototype,代码行数:7,代码来源:MonadicExpression.cs

示例11: Token

 public Token(string name, TokenType t, int line, int column)
 {
     this.Text = name;
     this.Type = t;
     this.Line = line;
     this.Column = column;
 }
开发者ID:7shi,项目名称:cs2fs,代码行数:7,代码来源:Token.cs

示例12: _get

 /// <summary>
 /// Gets the value of the next token of a certain type
 /// </summary>
 /// <param name="type">The type of token to retrieve</param>
 /// <returns>The token's value</returns>
 private string _get(TokenType type)
 {
     var token = _read();
     if (token.Type != type)
         throw new InvalidDataException(token.Type.ToString());
     return token.Value;
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:12,代码来源:Parser.cs

示例13: Token

 public Token(DateTimeOffset created, Guid tokenGuid, string tokenName, TokenType tokenType)
 {
     this.Created = created;
     this.TokenGuid = tokenGuid;
     this.TokenName = tokenName;
     this.TokenType = tokenType;
 }
开发者ID:jroberts-iii,项目名称:TechnicalInterview_FeedReader,代码行数:7,代码来源:Token.cs

示例14: DuplicateTokenEx

 public static extern bool DuplicateTokenEx(
     SafeFileHandle hExistingToken,
     uint dwDesiredAccess,
     SecurityAttributes lpTokenAttributes,
     SecurityImpersonationLevel impersonationLevel,
     TokenType tokenType,
     out IntPtr hNewToken);
开发者ID:stefanschneider,项目名称:IronFrame,代码行数:7,代码来源:DuplicateTokenEx.cs

示例15: Token

 public Token(TokenType type, string term, int start, int length)
 {
     Start = start;
     Length = length;
     Type = type;
     Term = term;
 }
开发者ID:vetterd,项目名称:CSBuild,代码行数:7,代码来源:Token.cs


注:本文中的TokenType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。