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

C# LexicalScope类代码示例

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

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



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

示例1: ForLoopExpression

        public ForLoopExpression(LexicalScope/*!*/ definedScope, Parameters/*!*/ variables, Expression/*!*/ list, Statements body, SourceSpan location)
            : base(location) {
            Assert.NotNull(definedScope, variables, list);

            _block = new BlockDefinition(definedScope, variables, body, location);
            _list = list;
        }
开发者ID:jschementi,项目名称:iron,代码行数:7,代码来源:ForLoopExpression.cs


示例2: ModuleDefinition

        public ModuleDefinition(LexicalScope/*!*/ definedScope, ConstantVariable/*!*/ qualifiedName, Body/*!*/ body, SourceSpan location)
            : base(definedScope, body, location)
        {
            ContractUtils.RequiresNotNull(qualifiedName, "qualifiedName");

            _qualifiedName = qualifiedName;
        }
开发者ID:TerabyteX,项目名称:main,代码行数:7,代码来源:ModuleDefinition.cs


示例3: ClassDefinition

        public ClassDefinition(LexicalScope/*!*/ definedScope, ConstantVariable/*!*/ name, Expression superClass, Body/*!*/ body, SourceSpan location)
            : base(definedScope, name, body, location)
        {
            ContractUtils.RequiresNotNull(name, "name");

            _superClass = superClass;
        }
开发者ID:TerabyteX,项目名称:main,代码行数:7,代码来源:ClassDefinition.cs


示例4: SingletonDefinition

        public SingletonDefinition(LexicalScope/*!*/ definedScope, Expression/*!*/ singleton, Body/*!*/ body, SourceSpan location)
            : base(definedScope, body, location)
        {
            ContractUtils.RequiresNotNull(singleton, "singleton");

            _singleton = singleton;
        }
开发者ID:TerabyteX,项目名称:main,代码行数:7,代码来源:SingletonDefinition.cs


示例5: Initializer

        public Initializer(LexicalScope/*!*/ definedScope, List<Expression> statements, SourceSpan location)
            : base(location) {
            Assert.NotNull(definedScope);

            _definedScope = definedScope;
            _statements = statements;
        }
开发者ID:mscottford,项目名称:ironruby,代码行数:7,代码来源:Initializer.cs


示例6: Finalizer

        public Finalizer(LexicalScope/*!*/ definedScope, Statements statements, SourceSpan location)
            : base(location) {
            Assert.NotNull(definedScope);

            _definedScope = definedScope;
            _statements = statements;
        }
开发者ID:jxnmaomao,项目名称:ironruby,代码行数:7,代码来源:Finalizer.cs


示例7: FunctionDeclarationStatementNode

 public FunctionDeclarationStatementNode(LexicalScope scope, string name, ParameterNode[] parameters, ElementNode[] body, SourceSpan sourceSpan)
     : base(sourceSpan)
 {
     this.scope = scope;
     this.name = name;
     this.parameters = parameters;
     this.body = body;
 }
开发者ID:Alxandr,项目名称:Totem-2.0,代码行数:8,代码来源:FunctionDeclarationStatementNode.cs


示例8: BlockDefinition

        public BlockDefinition(LexicalScope/*!*/ definedScope, CompoundLeftValue/*!*/ parameters, Statements/*!*/ body, SourceSpan location)
            : base(location) {
            Assert.NotNull(definedScope, parameters, body);

            _definedScope = definedScope;
            _body = body;
            _parameters = parameters;
        }
开发者ID:nieve,项目名称:ironruby,代码行数:8,代码来源:BlockDefinition.cs


示例9: BlockDefinition

        public BlockDefinition(LexicalScope definedScope, CompoundLeftValue/*!*/ parameters, List<Expression>/*!*/ body, SourceSpan location)
            : base(location) {
            Assert.NotNull(parameters, body);

            _definedScope = definedScope;
            _body = body;
            _parameters = parameters;
        }
开发者ID:mscottford,项目名称:ironruby,代码行数:8,代码来源:BlockDefinition.cs


示例10: BlockDefinition

        public BlockDefinition(LexicalScope/*!*/ definedScope, Parameters parameters, Statements/*!*/ body, SourceSpan location)
            : base(location) {
            Assert.NotNull(definedScope, body);

            _definedScope = definedScope;
            _body = body;
            _parameters = parameters ?? Parameters.Empty; 
        }
开发者ID:jschementi,项目名称:iron,代码行数:8,代码来源:BlockDefinition.cs


示例11: DefinitionExpression

        protected DefinitionExpression(LexicalScope/*!*/ definedScope, Body/*!*/ body, SourceSpan location) 
            : base(location) {
            ContractUtils.RequiresNotNull(definedScope, "definedScope");
            ContractUtils.RequiresNotNull(body, "body");

            _definedScope = definedScope;
            _body = body;
        }
开发者ID:BenHall,项目名称:ironruby,代码行数:8,代码来源:DefinitionExpression.cs


示例12: ToCondition

        internal override Expression/*!*/ ToCondition(LexicalScope/*!*/ currentScope) {
            var newExpression = _expression.ToCondition(currentScope);
            if (newExpression != _expression) {
                return new NotExpression(newExpression, Location);
            }

            return this;
        }
开发者ID:ExpertsInside,项目名称:IronSP,代码行数:8,代码来源:NotExpression.cs


示例13: CompileLet

        private void CompileLet(object form, LexicalScope lexScope)
        {
            throw new NotImplementedException();
              // Cons consForm = form as Cons;
              // if(consForm == null)
              // {
              //   throw new CompilerError("{0} is not let-form!", form);
              // }

              // Cons formArgs = consForm.Tail as Cons;
              // if(formArgs == null)
              // {
              //   throw new CompilerError("{0} is not let-form!", form);
              // }

              // Cons bindingList = formArgs.Head as Cons;
              // if(bindingList == null)
              // {
              //   throw new CompilerError("{0} is not let-form!", form);
              // }

              // while(bindingList != Cons.Nil)
              // {
              //   object arg = bindingList.Head;
              //   String type = TypeResolver.GetTypeRef(arg.GetType());
              //   switch(type)
              //   {
              //     case "symbol":
              //       lexScope.Bind(arg as Symbol, "value", Cons.Nil);
              //       break;

              //     case "cons":
              //       Cons argSpec = arg as Cons;
              //       Symbol sym = argSpec.Head as Symbol;
              //       if(sym == null)
              //       {
              //         throw new TypeError(argSpec.Head, typeof(Symbol));
              //       }
              //       Cons specTail = argSpec.Tail as Cons;
              //       if(specTail == null)
              //       {
              //         throw new TypeError(specTail.Tail, typeof(Cons));
              //       }
              //       object value = specTail.Head;
              //       lexScope.Bind(sym, "value", value);
              //       break;
              //     default:
              //       throw new TypeError(arg, typeof(Symbol));
              //   }

              //   Cons newArgs = bindingList.Tail as Cons;
              //   if(newArgs == null)
              //   {
              //     throw new TypeError(newArgs, typeof(Cons));
              //   }
              //   bindingList = newArgs;
              // }
        }
开发者ID:Sectoid,项目名称:shoggoth,代码行数:58,代码来源:SpecialForm.cs


示例14: MethodDefinition

        public MethodDefinition(LexicalScope/*!*/ definedScope, Expression target, string/*!*/ name, Parameters parameters, Body/*!*/ body, 
            SourceSpan location)
            : base(definedScope, body, location) {
            Assert.NotNull(name);

            _target = target;
            _name = name;
            _parameters = parameters ?? Parameters.Empty;
        }
开发者ID:BenHall,项目名称:ironruby,代码行数:9,代码来源:MethodDefinition.cs


示例15: ArgumentVariable

        public ArgumentVariable(int index, string name, LexicalScope parentScope, IChelaType type)
            : base(type, parentScope.GetModule())
        {
            base.SetName(name);
            this.parentScope = parentScope;

            // Add the variable into the scope.
            this.index = index;
            parentScope.AddArgument(this);
        }
开发者ID:ronsaldo,项目名称:chela,代码行数:10,代码来源:ArgumentVariable.cs


示例16: ToCondition

 internal override Expression/*!*/ ToCondition(LexicalScope/*!*/ currentScope) {
     int intBegin, intEnd;
     if (!IsIntegerRange(out intBegin, out intEnd)) {
         return new RangeCondition(
             this,
             currentScope.GetInnerMostTopScope().AddVariable("#FlipFlopState" + Interlocked.Increment(ref _flipFlopVariableId), Location)
         );
     }
     return this;
 }
开发者ID:aceptra,项目名称:ironruby,代码行数:10,代码来源:RangeExpression.cs


示例17: ForStatementNode

 public ForStatementNode(LexicalScope scope, StatementNode initializer, ExpressionNode condition,
     ExpressionNode incrementer, StatementNode body, SourceSpan span)
     : base(span)
 {
     this.scope = scope;
     this.initializer = initializer;
     this.condition = condition;
     this.incrementer = incrementer;
     this.body = body;
 }
开发者ID:Alxandr,项目名称:Totem-2.0,代码行数:10,代码来源:ForStatementNode.cs


示例18: ToCondition

        internal override Expression/*!*/ ToCondition(LexicalScope/*!*/ currentScope) {
            var newLeft = _left.ToCondition(currentScope);
            var newRight = _right.ToCondition(currentScope);

            if (newLeft != _left || newRight != _right) {
                return new OrExpression(newLeft, newRight, Location);
            }

            return this;
        }
开发者ID:atczyc,项目名称:ironruby,代码行数:10,代码来源:OrExpression.cs


示例19: MethodDefinition

        public MethodDefinition(LexicalScope/*!*/ definedScope, Expression target, string/*!*/ name, Parameters parameters, Body/*!*/ body, 
            SourceSpan location)
            : base(definedScope, body, location)
        {
            Assert.NotNull(name);

            // only for-loop block might use other than local variable for unsplat:
            Debug.Assert(parameters.Unsplat == null || parameters.Unsplat is LocalVariable);

            _target = target;
            _name = name;
            _parameters = parameters ?? Parameters.Empty;
        }
开发者ID:TerabyteX,项目名称:main,代码行数:13,代码来源:MethodDefinition.cs


示例20: ScopeBuilder

        public ScopeBuilder(AstParameters parameters, int firstClosureParam, int localCount, 
            ScopeBuilder parent, LexicalScope/*!*/ lexicalScope) {
            Debug.Assert(parent == null || parent.LexicalScope == lexicalScope.OuterScope);
#if DEBUG
            _id = Interlocked.Increment(ref _Id);
#endif
            _parent = parent;
            _parameters = parameters;
            _localCount = localCount;
            _firstClosureParam = firstClosureParam;
            _lexicalScope = lexicalScope;
            _hiddenVariables = new AstParameters();
            _localsTuple = DefineHiddenVariable("#locals", MakeLocalsTupleType());
            _outermostClosureReferredTo = this;
        }
开发者ID:atczyc,项目名称:ironruby,代码行数:15,代码来源:ScopeBuilder.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# LexicalState类代码示例发布时间:2022-05-24
下一篇:
C# LexicalInfo类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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