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

            _singleton = singleton;
        }
Example #2
0
        public ClassDefinition(LexicalScope/*!*/ definedScope, ConstantVariable/*!*/ name, Expression superClass, Body/*!*/ body, SourceSpan location)
            : base(definedScope, name, body, location)
        {
            ContractUtils.RequiresNotNull(name, "name");

            _superClass = superClass;
        }
Example #3
0
        public ModuleDefinition(LexicalScope/*!*/ definedScope, ConstantVariable/*!*/ qualifiedName, Body/*!*/ body, SourceSpan location)
            : base(definedScope, body, location)
        {
            ContractUtils.RequiresNotNull(qualifiedName, "qualifiedName");

            _qualifiedName = qualifiedName;
        }
Example #4
0
        protected DefinitionExpression(LexicalScope/*!*/ definedScope, Body/*!*/ body, SourceSpan location) 
            : base(location) {
            ContractUtils.RequiresNotNull(definedScope, "definedScope");
            ContractUtils.RequiresNotNull(body, "body");

            _definedScope = definedScope;
            _body = body;
        }
Example #5
0
        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;
        }
Example #6
0
        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;
        }
Example #7
0
 protected ModuleDefinition(LexicalScope/*!*/ definedScope, Body/*!*/ body, SourceSpan location)
     : base(definedScope, body, location) {
     _qualifiedName = null;
 }
Example #8
0
 public virtual void Exit(Body/*!*/ node) { }
Example #9
0
 public virtual bool Enter(Body/*!*/ node) { return true; }
Example #10
0
        public ClassDefinition(LexicalScope /*!*/ definedScope, ConstantVariable /*!*/ name, Expression superClass, Body /*!*/ body, SourceSpan location)
            : base(definedScope, name, body, location)
        {
            ContractUtils.RequiresNotNull(name, "name");

            _superClass = superClass;
        }
Example #11
0
 public virtual void Exit(Body /*!*/ node)
 {
 }
Example #12
0
 public virtual bool Enter(Body /*!*/ node)
 {
     return(true);
 }