dvander@0: /* dvander@0: * Copyright (C) 2012 David Anderson dvander@0: * dvander@0: * This file is part of JITCraft. dvander@0: * dvander@0: * JITCraft is free software: you can redistribute it and/or modify it under dvander@0: * the terms of the GNU General Public License as published by the Free dvander@0: * Software Foundation, either version 3 of the License, or (at your option) dvander@0: * any later version. dvander@0: * dvander@0: * Foobar is distributed in the hope that it will be useful, but WITHOUT ANY dvander@0: * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS dvander@0: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. dvander@0: * dvander@0: * You should have received a copy of the GNU General Public License along with dvander@0: * JITCraft. If not, see http://www.gnu.org/licenses/. dvander@0: */ dvander@0: #include "NameBinding.h" dvander@54: #include "Strings.h" dvander@47: #include "Zone.h" dvander@0: dvander@59: using namespace ke; dvander@0: dvander@54: BoundName::BoundName(Scope *scope, Handle name, const SourcePosition &pos) dvander@0: : scope_(scope), dvander@21: name_(name), dvander@25: type_(NULL), dvander@25: pos_(pos) dvander@0: { dvander@0: } dvander@0: dvander@63: NamedFunction::NamedFunction(Scope *scope, Handle name, const SourcePosition &pos, dvander@63: TokenKind token) dvander@63: : BoundName(scope, name, pos), dvander@63: token_(token) dvander@0: { dvander@0: } dvander@0: dvander@54: Variable::Variable(Scope *scope, Handle name, const SourcePosition &pos) dvander@25: : BoundName(scope, name, pos), dvander@0: location_(UNALLOCATED) dvander@0: { dvander@0: }