• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# CodeModel.Token类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ConstantFieldDeclarationNode

 public ConstantFieldDeclarationNode(Token token,
                                     ParseNodeList attributes,
                                     Modifiers modifiers,
                                     ParseNode type,
                                     ParseNodeList initializers)
     : base(ParseNodeType.ConstFieldDeclaration, token, attributes, modifiers, type, initializers, false) {
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:7,代码来源:ConstantFieldDeclarationNode.cs


示例2: UsingNode

 public UsingNode(Token token,
                  ParseNode guard,
                  ParseNode body)
     : base(ParseNodeType.Using, token) {
     _guard = GetParentedNode(guard);
     _body = GetParentedNode(body);
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:7,代码来源:UsingNode.cs


示例3: DestructorDeclarationNode

 public DestructorDeclarationNode(Token token,
                                  ParseNodeList attributes,
                                  Modifiers modifiers,
                                  AtomicNameNode name,
                                  BlockStatementNode body)
     : base(ParseNodeType.DestructorDeclaration, token, attributes, modifiers, /* return type */ null, name, new ParseNodeList(), body) {
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:7,代码来源:DestructorDeclarationNode.cs


示例4: AttributeBlockNode

 public AttributeBlockNode(Token token,
                           AttributeTargets location,
                           ParseNodeList attributes)
     : base(ParseNodeType.AttributeBlock, token) {
     _location = location;
     _attributes = GetParentedNodeList(attributes);
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:7,代码来源:AttributeBlockNode.cs


示例5: ReportError

 private void ReportError(Error error, Token token, params object[] args) {
     BufferPosition newPosition = token.Position;
     if (OnError != null && lastErrorPosition != newPosition) {
         OnError(this, new ErrorEventArgs(error, newPosition, args));
     }
     lastErrorPosition = newPosition;
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:7,代码来源:Parser.cs


示例6: SwitchSectionNode

 public SwitchSectionNode(Token token,
                          ParseNodeList labels,
                          ParseNodeList statements)
     : base(ParseNodeType.SwitchSection, token) {
     _labels = GetParentedNodeList(labels);
     _statements = GetParentedNodeList(statements);
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:7,代码来源:SwitchSectionNode.cs


示例7: SwitchNode

 public SwitchNode(Token token,
                   ParseNode condition,
                   ParseNodeList cases)
     : base(ParseNodeType.Switch, token) {
     _condition = GetParentedNode(condition);
     _cases = GetParentedNodeList(cases);
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:7,代码来源:SwitchNode.cs


示例8: LockNode

 public LockNode(Token token,
                 ParseNode monitor,
                 ParseNode body)
     : base(ParseNodeType.Lock, token) {
     this.monitor = GetParentedNode(monitor);
     this.body = GetParentedNode(body);
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:7,代码来源:LockNode.cs


示例9: FixedNode

 public FixedNode(Token token,
                  VariableDeclarationNode declaration,
                  ParseNode body)
     : base(ParseNodeType.Fixed, token) {
     _declaration = (VariableDeclarationNode)GetParentedNode(declaration);
     _body = GetParentedNode(body);
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:7,代码来源:FixedNode.cs


示例10: Parse

        /// <summary>
        /// Preprocesses, Lexes and Parses a C# compilation unit. Subscribe to the OnError
        /// event before calling this method to receive error notifications.
        /// After calling Parse, the Defines property contains the list of preprocessor
        /// symbols defined as a result of #define and #undef directives in this
        /// compilation unit.
        /// </summary>
        public CompilationUnitNode Parse(Token[] tokens, LineMap lineMap) {
            _lineMap = lineMap;
            CompilationUnitNode parseTree = _parser.Parse(tokens);
            _lineMap = null;

            return parseTree;
        }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:14,代码来源:FileParser.cs


示例11: DoWhileNode

 public DoWhileNode(Token token,
               ParseNode body,
               ParseNode condition)
     : base(ParseNodeType.DoWhile, token) {
     _body = GetParentedNode(body);
     _condition = GetParentedNode(condition);
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:7,代码来源:DoWhileNode.cs


示例12: VariableDeclarationNode

 public VariableDeclarationNode(Token token,
                                ParseNodeList attributes,
                                Modifiers modifiers,
                                ParseNode type,
                                ParseNodeList initializers,
                                bool isFixed)
     : this(ParseNodeType.VariableDeclaration, token, attributes, modifiers, type, initializers, isFixed) {
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:8,代码来源:VariableDeclarationNode.cs


示例13: Parse

        /// <summary>
        /// Parses an array of C# tokens. Subscribe to the OnError event before
        /// calling Parse to receive errors while Parsing.
        /// </summary>
        public CompilationUnitNode Parse(Token[] tokens) {
            this.tokens = tokens;

            iToken = 0;
            lastErrorPosition.Column = -1;

            return ParseCompilationUnit();
        }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:12,代码来源:Parser.cs


示例14: CatchNode

 public CatchNode(Token token, ParseNode type,
                  AtomicNameNode name,
                  ParseNode body)
     : base(ParseNodeType.Catch, token) {
     _type = GetParentedNode(type);
     _name = (AtomicNameNode)GetParentedNode(name);
     _body = GetParentedNode(body);
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:8,代码来源:CatchNode.cs


示例15: NamespaceNode

 public NamespaceNode(Token token, string name,
                      ParseNodeList usingClauses,
                      ParseNodeList members)
     : base(ParseNodeType.Namespace, token) {
     _name = name;
     _usingClauses = GetParentedNodeList(usingClauses);
     _members = GetParentedNodeList(members);
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:8,代码来源:NamespaceNode.cs


示例16: ArrayNewNode

 public ArrayNewNode(Token token,
                     ParseNode typeReference,
                     ParseNode expressionList,
                     ParseNode initializerExpression)
     : base(ParseNodeType.ArrayNew, token) {
     _typeReference = GetParentedNode(typeReference);
     _expressionList = GetParentedNode(expressionList);
     _initializerExpression = GetParentedNode(initializerExpression);
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:9,代码来源:ArrayNewNode.cs


示例17: IfElseNode

 public IfElseNode(Token token,
               ParseNode condition,
               ParseNode ifBlock,
               ParseNode elseBlock)
     : base(ParseNodeType.IfElse, token) {
     _condition = GetParentedNode(condition);
     _ifBlock = GetParentedNode(ifBlock);
     _elseBlock = GetParentedNode(elseBlock);
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:9,代码来源:IfElseNode.cs


示例18: TryNode

 public TryNode(Token token,
                ParseNode body,
                ParseNodeList catchClauses,
                ParseNode finallyClause)
     : base(ParseNodeType.Try, token) {
     _body = GetParentedNode(body);
     _catchClauses = GetParentedNodeList(catchClauses);
     _finallyClause = GetParentedNode(finallyClause);
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:9,代码来源:TryNode.cs


示例19: OperatorDeclarationNode

 public OperatorDeclarationNode(Token token,
                                ParseNodeList attributes,
                                Modifiers modifiers,
                                TokenType operatorNodeType,
                                ParseNode returnType,
                                ParseNodeList formals,
                                BlockStatementNode body)
     : base(ParseNodeType.OperatorDeclaration, token, attributes, modifiers, returnType, /* name */ null, formals, body) {
     this.operatorTokenType = operatorNodeType;
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:10,代码来源:OperatorDeclarationNode.cs


示例20: ForNode

 public ForNode(Token token,
                ParseNode initializer,
                ParseNode condition,
                ParseNode increment,
                ParseNode body)
     : base(ParseNodeType.For, token) {
     _initializer = GetParentedNode(initializer);
     _condition = GetParentedNode(condition);
     _increment = GetParentedNode(increment);
     _body = GetParentedNode(body);
 }
开发者ID:fugaku,项目名称:scriptsharp,代码行数:11,代码来源:ForNode.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Generator.ScriptGenerator类代码示例发布时间:2022-05-26
下一篇:
C# CodeModel.ParseNodeList类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap