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


TypeScript collection.SetWrapper类代码示例

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


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

示例1: scanComplexOperator

 scanComplexOperator(start:int, code:int, one:string, two:string):Token {
   assert(this.peek == StringWrapper.charCodeAt(one, 0));
   this.advance();
   var str:string = one;
   if (this.peek == code) {
     this.advance();
     str += two;
   }
   assert(SetWrapper.has(OPERATORS, str));
   return newOperatorToken(start, str);
 }
开发者ID:tavwizard,项目名称:angular,代码行数:11,代码来源:lexer.ts

示例2: scanIdentifier

 scanIdentifier():Token {
   assert(isIdentifierStart(this.peek));
   var start:int = this.index;
   this.advance();
   while (isIdentifierPart(this.peek)) this.advance();
   var str:string = this.input.substring(start, this.index);
   if (SetWrapper.has(KEYWORDS, str)) {
     return newKeywordToken(start, str);
   } else {
     return newIdentifierToken(start, str);
   }
 }
开发者ID:tavwizard,项目名称:angular,代码行数:12,代码来源:lexer.ts

示例3: scanComplexOperator

 /**
  * Tokenize a 2/3 char long operator
  *
  * @param start start index in the expression
  * @param one first symbol (always part of the operator)
  * @param twoCode code point for the second symbol
  * @param two second symbol (part of the operator when the second code point matches)
  * @param threeCode code point for the third symbol
  * @param three third symbol (part of the operator when provided and matches source expression)
  * @returns {Token}
  */
 scanComplexOperator(start: number, one: string, twoCode: number, two: string, threeCode?: number,
                     three?: string): Token {
   assert(this.peek == StringWrapper.charCodeAt(one, 0));
   this.advance();
   var str: string = one;
   if (this.peek == twoCode) {
     this.advance();
     str += two;
   }
   if (isPresent(threeCode) && this.peek == threeCode) {
     this.advance();
     str += three;
   }
   assert(SetWrapper.has(OPERATORS, str));
   return newOperatorToken(start, str);
 }
开发者ID:B-Thapa,项目名称:angular,代码行数:27,代码来源:lexer.ts

示例4: scanOperator

 scanOperator(start:int, str:string):Token {
   assert(this.peek == StringWrapper.charCodeAt(str, 0));
   assert(SetWrapper.has(OPERATORS, str));
   this.advance();
   return newOperatorToken(start, str);
 }
开发者ID:tavwizard,项目名称:angular,代码行数:6,代码来源:lexer.ts

示例5:

    default: return code;
  }
}

var OPERATORS = SetWrapper.createFromList([
  '+',
  '-',
  '*',
  '/',
  '~/',
  '%',
  '^',
  '=',
  '==',
  '!=',
  '<',
  '>',
  '<=',
  '>=',
  '&&',
  '||',
  '&',
  '|',
  '!',
  '?',
  '#'
]);


var KEYWORDS = SetWrapper.createFromList([
  'var',
开发者ID:tavwizard,项目名称:angular,代码行数:31,代码来源:lexer.ts

示例6:

 return ListWrapper.filter(allTypes, (key) => { return !SetWrapper.has(this._usedKeys, key); });
开发者ID:KenWilliamson,项目名称:Angular2HostedMobileApp,代码行数:1,代码来源:reflector.ts

示例7:

  }
}

var OPERATORS = SetWrapper.createFromList([
  '+',
  '-',
  '*',
  '/',
  '%',
  '^',
  '=',
  '==',
  '!=',
  '===',
  '!==',
  '<',
  '>',
  '<=',
  '>=',
  '&&',
  '||',
  '&',
  '|',
  '!',
  '?',
  '#',
  '?.'
]);


var KEYWORDS =
开发者ID:XomegaNet,项目名称:angular,代码行数:31,代码来源:lexer.ts


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