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


C# GreenNode类代码示例

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


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

示例1: ResetPoint

 internal ResetPoint(int resetCount, LexerMode mode, int position, GreenNode prevTokenTrailingTrivia)
 {
     this.ResetCount = resetCount;
     this.Mode = mode;
     this.Position = position;
     this.PrevTokenTrailingTrivia = prevTokenTrailingTrivia;
 }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:7,代码来源:SyntaxParser.ResetPoint.cs

示例2: AreTokensEquivalent

        private static bool AreTokensEquivalent(GreenNode before, GreenNode after)
        {
            // NOTE(cyrusn): Do we want to drill into trivia?  Can documentation ever affect the
            // global meaning of symbols?  This can happen in java with things like the "@obsolete"
            // clause in doc comment.  However, i don't know if anything like that exists in C#. 

            // NOTE(cyrusn): I don't believe we need to examine pp directives.  We actually want to
            // intentionally ignore them as we're only paying attention to the trees that affect
            // symbolic information.

            // NOTE(cyrusn): I don't believe we need to examine skipped text.  It isn't relevant from
            // the perspective of global symbolic information.
            Debug.Assert(before.RawKind == after.RawKind);

            if (before.IsMissing != after.IsMissing)
            {
                return false;
            }

            // These are the tokens that don't have fixed text.
            switch ((SyntaxKind)before.RawKind)
            {
                case SyntaxKind.IdentifierToken:
                    return ((Green.SyntaxToken)before).ValueText == ((Green.SyntaxToken)after).ValueText;

                case SyntaxKind.NumericLiteralToken:
                case SyntaxKind.CharacterLiteralToken:
                case SyntaxKind.StringLiteralToken:
                case SyntaxKind.InterpolatedStringTextToken:
                    return ((Green.SyntaxToken)before).Text == ((Green.SyntaxToken)after).Text;
            }

            return true;
        }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:34,代码来源:SyntaxEquivalence.cs

示例3: Enumerator

 internal Enumerator(GreenNode node)
 {
     this.node = node;
     this.childIndex = -1;
     this.listIndex = -1;
     this.list = null;
     this.currentChild = null;
 }
开发者ID:modulexcite,项目名称:pattern-matching-csharp,代码行数:8,代码来源:ChildSyntaxList.Enumerator.cs

示例4: WithTwoChildren

 internal WithTwoChildren(GreenNode child0, GreenNode child1)
 {
     this.SlotCount = 2;
     this.AdjustFlagsAndWidth(child0);
     _child0 = child0;
     this.AdjustFlagsAndWidth(child1);
     _child1 = child1;
 }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:8,代码来源:SyntaxList.WithTwoChildren.cs

示例5: NoteGreen

 internal static void NoteGreen(GreenNode node)
 {
     Interlocked.Increment(ref stats.greenNodes);
     if (node.IsToken)
     {
         Interlocked.Increment(ref stats.greenTokens);
     }
 }
开发者ID:Rickinio,项目名称:roslyn,代码行数:8,代码来源:SyntaxNodeCache.cs

示例6: Enumerator

 internal Enumerator(GreenNode node)
 {
     _node = node;
     _childIndex = -1;
     _listIndex = -1;
     _list = null;
     _currentChild = null;
 }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:8,代码来源:ChildSyntaxList.Enumerator.cs

示例7: SyntaxIdentifierWithTrailingTrivia

 internal SyntaxIdentifierWithTrailingTrivia(string text, GreenNode trailing, DiagnosticInfo[] diagnostics, SyntaxAnnotation[] annotations)
     : base(text, diagnostics, annotations)
 {
     if (trailing != null)
     {
         this.AdjustFlagsAndWidth(trailing);
         _trailing = trailing;
     }
 }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:9,代码来源:SyntaxToken.SyntaxIdentifierWithTrailingTrivia.cs

示例8: Add

        internal void Add(GreenNode item)
        {
            if (_nodes == null || _count >= _nodes.Length)
            {
                this.Grow(_count == 0 ? 8 : _nodes.Length * 2);
            }

            _nodes[_count++] = item;
        }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:9,代码来源:SyntaxNodeOrTokenListBuilder.cs

示例9: WithThreeChildren

 internal WithThreeChildren(GreenNode child0, GreenNode child1, GreenNode child2)
 {
     this.SlotCount = 3;
     this.AdjustFlagsAndWidth(child0);
     _child0 = child0;
     this.AdjustFlagsAndWidth(child1);
     _child1 = child1;
     this.AdjustFlagsAndWidth(child2);
     _child2 = child2;
 }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:10,代码来源:SyntaxList.WithThreeChildren.cs

示例10: Enumerator

 internal Enumerator(GreenNode node)
 {
     _current = null;
     _stack = null;
     _count = 0;
     if (node != null && node.ContainsDiagnostics)
     {
         _stack = new NodeIteration[8];
         this.PushNodeOrToken(node);
     }
 }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:11,代码来源:SyntaxDiagnosticInfoList.cs

示例11: SyntaxTokenWithTrivia

 internal SyntaxTokenWithTrivia(SyntaxKind kind, GreenNode leading, GreenNode trailing)
     : base(kind)
 {
     if (leading != null)
     {
         this.AdjustFlagsAndWidth(leading);
         this.LeadingField = leading;
     }
     if (trailing != null)
     {
         this.AdjustFlagsAndWidth(trailing);
         this.TrailingField = trailing;
     }
 }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:14,代码来源:SyntaxToken.SyntaxTokenWithTrivia.cs

示例12: SyntaxTreeDiagnosticEnumerator

 internal SyntaxTreeDiagnosticEnumerator(SyntaxTree syntaxTree, GreenNode node, int position)
 {
     this.syntaxTree = null;
     this.current = null;
     this.position = position;
     if (node != null && node.ContainsDiagnostics)
     {
         this.syntaxTree = syntaxTree;
         this.stack = new NodeIterationStack(DefaultStackCapacity);
         this.stack.PushNodeOrToken(node);
     }
     else
     {
         this.stack = new NodeIterationStack();
     }
 }
开发者ID:EkardNT,项目名称:Roslyn,代码行数:16,代码来源:SyntaxTreeDiagnosticEnumerator.cs

示例13: Enumerator

                internal Enumerator(GreenNode node)
                {
                    if (node != null)
                    {
                        this.node = node;
                        this.childIndex = node.SlotCount;
                        this.listIndex = -1;
                    }
                    else
                    {
                        this.node = null;
                        this.childIndex = 0;
                        this.listIndex = -1;
                    }

                    this.list = null;
                    this.currentChild = null;
                }
开发者ID:EkardNT,项目名称:Roslyn,代码行数:18,代码来源:ChildSyntaxList.Reversed.Enumerator.cs

示例14: Enumerator

                internal Enumerator(GreenNode node)
                {
                    if (node != null)
                    {
                        _node = node;
                        _childIndex = node.SlotCount;
                        _listIndex = -1;
                    }
                    else
                    {
                        _node = null;
                        _childIndex = 0;
                        _listIndex = -1;
                    }

                    _list = null;
                    _currentChild = null;
                }
开发者ID:Rickinio,项目名称:roslyn,代码行数:18,代码来源:ChildSyntaxList.Reversed.Enumerator.cs

示例15: SyntaxIdentifierWithTrivia

 internal SyntaxIdentifierWithTrivia(
     SyntaxKind contextualKind,
     string text,
     string valueText,
     GreenNode leading,
     GreenNode trailing)
     : base(contextualKind, text, valueText)
 {
     if (leading != null)
     {
         this.AdjustFlagsAndWidth(leading);
         _leading = leading;
     }
     if (trailing != null)
     {
         this.AdjustFlagsAndWidth(trailing);
         _trailing = trailing;
     }
 }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:19,代码来源:SyntaxToken.SyntaxIdentifierWithTrivia.cs


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