changeset 22051:b26deb163f16

backout changeset 52ba013fd495
author Mick Jordan <mick.jordan@oracle.com>
date Fri, 31 Jul 2015 14:42:26 -0700
parents 7be57462fa84
children 446ec33cadbe
files truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/SyntaxNode.java
diffstat 2 files changed, 0 insertions(+), 60 deletions(-) [+]
line wrap: on
line diff
--- 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.
      *
--- 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 {
-}