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


C# LexicalScope类代码示例

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


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


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