當前位置: 首頁>>代碼示例>>C#>>正文


C# CodeModel.Token類代碼示例

本文整理匯總了C#中ScriptSharp.CodeModel.Token的典型用法代碼示例。如果您正苦於以下問題:C# Token類的具體用法?C# Token怎麽用?C# Token使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Token類屬於ScriptSharp.CodeModel命名空間,在下文中一共展示了Token類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的ScriptSharp.CodeModel.Token類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。