本文整理汇总了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;
}
示例2: ModuleDefinition
public ModuleDefinition(LexicalScope/*!*/ definedScope, ConstantVariable/*!*/ qualifiedName, Body/*!*/ body, SourceSpan location)
: base(definedScope, body, location)
{
ContractUtils.RequiresNotNull(qualifiedName, "qualifiedName");
_qualifiedName = qualifiedName;
}
示例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;
}
示例4: SingletonDefinition
public SingletonDefinition(LexicalScope/*!*/ definedScope, Expression/*!*/ singleton, Body/*!*/ body, SourceSpan location)
: base(definedScope, body, location)
{
ContractUtils.RequiresNotNull(singleton, "singleton");
_singleton = singleton;
}
示例5: Initializer
public Initializer(LexicalScope/*!*/ definedScope, List<Expression> statements, SourceSpan location)
: base(location) {
Assert.NotNull(definedScope);
_definedScope = definedScope;
_statements = statements;
}
示例6: Finalizer
public Finalizer(LexicalScope/*!*/ definedScope, Statements statements, SourceSpan location)
: base(location) {
Assert.NotNull(definedScope);
_definedScope = definedScope;
_statements = statements;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例11: DefinitionExpression
protected DefinitionExpression(LexicalScope/*!*/ definedScope, Body/*!*/ body, SourceSpan location)
: base(location) {
ContractUtils.RequiresNotNull(definedScope, "definedScope");
ContractUtils.RequiresNotNull(body, "body");
_definedScope = definedScope;
_body = body;
}
示例12: ToCondition
internal override Expression/*!*/ ToCondition(LexicalScope/*!*/ currentScope) {
var newExpression = _expression.ToCondition(currentScope);
if (newExpression != _expression) {
return new NotExpression(newExpression, Location);
}
return this;
}
示例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;
// }
}
示例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;
}
示例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);
}