01: /*
02: * xtc - The eXTensible Compiler
03: * Copyright (C) 2005 Robert Grimm
04: *
05: * This program is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU General Public License
07: * version 2 as published by the Free Software Foundation.
08: *
09: * This program is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU General Public License for more details.
13: *
14: * You should have received a copy of the GNU General Public License
15: * along with this program; if not, write to the Free Software
16: * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17: * USA.
18: */
19: package xtc.parser;
20:
21: import xtc.tree.Node;
22:
23: /**
24: * The superclass of all names.
25: *
26: * @author Robert Grimm
27: * @version $Revision: 1.2 $
28: */
29: public class Name extends Node {
30:
31: /** The name. */
32: public final String name;
33:
34: /**
35: * Create a new name.
36: *
37: * @param name The name.
38: */
39: public Name(String name) {
40: this .name = name;
41: }
42:
43: public int hashCode() {
44: return name.hashCode();
45: }
46:
47: public String toString() {
48: return name;
49: }
50:
51: }
|