jitcraft/NameBinding.cpp
changeset 0 c455ebb9a5dc
child 21 af5d8e985502
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/jitcraft/NameBinding.cpp	Mon Jun 25 02:57:28 2012 -0700
     1.3 @@ -0,0 +1,37 @@
     1.4 +/*
     1.5 + * Copyright (C) 2012 David Anderson
     1.6 + *
     1.7 + * This file is part of JITCraft.
     1.8 + *
     1.9 + * JITCraft is free software: you can redistribute it and/or modify it under
    1.10 + * the terms of the GNU General Public License as published by the Free
    1.11 + * Software Foundation, either version 3 of the License, or (at your option)
    1.12 + * any later version.
    1.13 + * 
    1.14 + * Foobar is distributed in the hope that it will be useful, but WITHOUT ANY
    1.15 + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    1.16 + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    1.17 + *
    1.18 + * You should have received a copy of the GNU General Public License along with
    1.19 + * JITCraft. If not, see http://www.gnu.org/licenses/.
    1.20 + */
    1.21 +#include "NameBinding.h"
    1.22 +
    1.23 +using namespace jc;
    1.24 +
    1.25 +BoundName::BoundName(Scope *scope, Name *name)
    1.26 +  : scope_(scope),
    1.27 +    name_(name)
    1.28 +{
    1.29 +}
    1.30 +
    1.31 +NamedFunction::NamedFunction(Scope *scope, Name *name)
    1.32 +  : BoundName(scope, name)
    1.33 +{
    1.34 +}
    1.35 +
    1.36 +Variable::Variable(Scope *scope, Name *name)
    1.37 +  : BoundName(scope, name),
    1.38 +    location_(UNALLOCATED)
    1.39 +{
    1.40 +}