Skip to content
Snippets Groups Projects
Commit 76da3cdc authored by dgelessus's avatar dgelessus
Browse files

Remove Cast and subclasses

The "typed" collections that used them have all been removed.

A second copy of Cast and TypedLinkedList still exists in the node
package and are used by the node classes to store their children. These
classes were generated by an old SableCC version and will disappear once
we regenerate the SableCC parser.
parent 8f6851b8
No related branches found
No related tags found
No related merge requests found
Pipeline #85074 passed
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This file is part of SableCC. *
* See the file "LICENSE" for copyright information and the *
* terms and conditions for copying, distribution and *
* modification of SableCC. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package org.sablecc.sablecc;
import java.util.*;
public class BooleanCast implements Cast
{
public final static BooleanCast instance = new BooleanCast();
private BooleanCast()
{}
public Object cast(Object o)
{
return (Boolean) o;
}
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This file is part of SableCC. *
* See the file "LICENSE" for copyright information and the *
* terms and conditions for copying, distribution and *
* modification of SableCC. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package org.sablecc.sablecc;
public interface Cast
{
Object cast(Object o);
}
...@@ -210,17 +210,4 @@ public class CharSet implements Cloneable ...@@ -210,17 +210,4 @@ public class CharSet implements Cloneable
public char start; public char start;
public char end; public char end;
} }
public static class IntervalCast implements Cast
{
public final static IntervalCast instance = new IntervalCast();
private IntervalCast()
{}
public Object cast(Object o)
{
return (Interval) o;
}
}
} }
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This file is part of SableCC. *
* See the file "LICENSE" for copyright information and the *
* terms and conditions for copying, distribution and *
* modification of SableCC. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package org.sablecc.sablecc;
import java.util.*;
public class IntegerCast implements Cast
{
public final static IntegerCast instance = new IntegerCast();
private IntegerCast()
{}
public Object cast(Object o)
{
return (Integer) o;
}
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This file is part of SableCC. *
* See the file "LICENSE" for copyright information and the *
* terms and conditions for copying, distribution and *
* modification of SableCC. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package org.sablecc.sablecc;
import java.util.*;
public class ListCast implements Cast
{
public final static ListCast instance = new ListCast();
private ListCast()
{}
public Object cast(Object o)
{
return (List) o;
}
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This file is part of SableCC. *
* See the file "LICENSE" for copyright information and the *
* terms and conditions for copying, distribution and *
* modification of SableCC. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package org.sablecc.sablecc;
public class NoCast implements Cast
{
public final static NoCast instance = new NoCast();
private NoCast()
{}
public Object cast(Object o)
{
return o;
}
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This file is part of SableCC. *
* See the file "LICENSE" for copyright information and the *
* terms and conditions for copying, distribution and *
* modification of SableCC. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package org.sablecc.sablecc;
import java.util.*;
import org.sablecc.sablecc.node.*;
public class NodeCast implements Cast
{
public final static NodeCast instance = new NodeCast();
private NodeCast()
{}
public Object cast(Object o)
{
return (Node) o;
}
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This file is part of SableCC. *
* See the file "LICENSE" for copyright information and the *
* terms and conditions for copying, distribution and *
* modification of SableCC. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package org.sablecc.sablecc;
import java.util.*;
public class StringCast implements Cast
{
public final static StringCast instance = new StringCast();
private StringCast()
{}
public Object cast(Object o)
{
return (String) o;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment