# HG changeset patch # User Mick Jordan # Date 1438378946 25200 # Node ID b26deb163f1629c31af5766a415697a52a21c9b5 # Parent 7be57462fa848708ea0d942d11c874668aa3866c backout changeset 52ba013fd495 diff -r 7be57462fa84 -r b26deb163f16 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java Tue Jul 28 17:28:29 2015 -0700 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java Fri Jul 31 14:42:26 2015 -0700 @@ -146,33 +146,6 @@ } /** - * Handles the discovery of the {@link SyntaxNode} that this node is derived from. - */ - public SyntaxNode asSyntaxNode() { - if (this instanceof SyntaxNode) { - return (SyntaxNode) this; - } else { - return getSyntaxNode(); - } - } - - /** - * Locates the {@link SyntaxNode} with which this node is associated/derived. Many nodes - * organize themselves in such a way that the relevant {@link SyntaxNode} can be found by - * following the parent chain, which is therefore the default implementation. - */ - protected SyntaxNode getSyntaxNode() { - Node current = this; - while (current != null) { - if (current instanceof SyntaxNode) { - return (SyntaxNode) current; - } - current = current.getParent(); - } - throw new IllegalStateException("no SyntaxNode found"); - } - - /** * Method that updates the link to the parent in the array of specified new child nodes to this * node. * diff -r 7be57462fa84 -r b26deb163f16 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/SyntaxNode.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/SyntaxNode.java Tue Jul 28 17:28:29 2015 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2015, 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.oracle.truffle.api.nodes; - -/** - * An tagging interface that identifies an AST node as being part of the syntactic structure of the - * (original) AST. There are some useful {@code default} methods that could be added once Truffle - * moves to 1.8. - */ -public interface SyntaxNode { -}