ada.editor/src/org/netbeans/modules/ada/editor/ast/nodes/Identifier.java
author Andrea Lucarelli <raster@netbeans.org>
Sun, 22 Aug 2010 23:37:11 +0200
branchrelease68
changeset 16367 d2820c029d3a
parent 15779 367c7fdb5d23
permissions -rw-r--r--
Add JVM compiler support.
raster@14180
     1
/*
raster@14180
     2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
raster@14180
     3
 *
raster@14180
     4
 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
raster@14180
     5
 *
raster@14180
     6
 * The contents of this file are subject to the terms of either the GNU
raster@14180
     7
 * General Public License Version 2 only ("GPL") or the Common
raster@14180
     8
 * Development and Distribution License("CDDL") (collectively, the
raster@14180
     9
 * "License"). You may not use this file except in compliance with the
raster@14180
    10
 * License. You can obtain a copy of the License at
raster@14180
    11
 * http://www.netbeans.org/cddl-gplv2.html
raster@14180
    12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
raster@14180
    13
 * specific language governing permissions and limitations under the
raster@14180
    14
 * License.  When distributing the software, include this License Header
raster@14180
    15
 * Notice in each file and include the License file at
raster@14180
    16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
raster@14180
    17
 * particular file as subject to the "Classpath" exception as provided
raster@14180
    18
 * by Sun in the GPL Version 2 section of the License file that
raster@14180
    19
 * accompanied this code. If applicable, add the following below the
raster@14180
    20
 * License Header, with the fields enclosed by brackets [] replaced by
raster@14180
    21
 * your own identifying information:
raster@14180
    22
 * "Portions Copyrighted [year] [name of copyright owner]"
raster@14180
    23
 *
raster@14180
    24
 * If you wish your version of this file to be governed by only the CDDL
raster@14180
    25
 * or only the GPL Version 2, indicate your decision by adding
raster@14180
    26
 * "[Contributor] elects to include this software in this distribution
raster@14180
    27
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
raster@14180
    28
 * single choice of license, a recipient has the option to distribute
raster@14180
    29
 * your version of this file under either the CDDL, the GPL Version 2 or
raster@14180
    30
 * to extend the choice of license to its licensees as provided above.
raster@14180
    31
 * However, if you add GPL Version 2 code and therefore, elected the GPL
raster@14180
    32
 * Version 2 license, then the option applies only if the new code is
raster@14180
    33
 * made subject to such option by the copyright holder.
raster@14180
    34
 *
raster@14180
    35
 * Contributor(s):
raster@14180
    36
 *
raster@14180
    37
 * Portions Copyrighted 2008 Sun Microsystems, Inc.
raster@14180
    38
 */
raster@14180
    39
package org.netbeans.modules.ada.editor.ast.nodes;
raster@14180
    40
raster@14180
    41
import org.netbeans.modules.ada.editor.ast.nodes.visitors.Visitor;
raster@14180
    42
raster@14180
    43
/**
raster@14180
    44
 * Based on org.netbeans.modules.php.editor.parser.astnodes.Identifier
raster@14180
    45
 * 
raster@14695
    46
 * Holds an identifier.
raster@14695
    47
 * Uses for variable name, function name, procedure name and package name.
raster@14695
    48
 * <pre>e.g.<pre>  
raster@16367
    49
 * Count X Get_Symbol Ethelyn Marion
raster@16367
    50
 * Snobol_4 X1 Page_Count Store_Next_Item
raster@14180
    51
 *
raster@14180
    52
 * @author Andrea Lucarelli
raster@14180
    53
 */
raster@14180
    54
public class Identifier extends Expression {
raster@14180
    55
raster@14180
    56
    private String name;
raster@14180
    57
raster@14695
    58
    public Identifier(int start, int end, String name) {
raster@14180
    59
        super(start, end);
raster@16367
    60
        this.name = name;
raster@14180
    61
    }
raster@14180
    62
raster@14180
    63
    public String getName() {
raster@14180
    64
        return name;
raster@14180
    65
    }
raster@14695
    66
raster@14180
    67
    @Override
raster@14180
    68
    public void accept(Visitor visitor) {
raster@14180
    69
        visitor.visit(this);
raster@14180
    70
    }
raster@14180
    71
}