PageRenderTime 42ms CodeModel.GetById 33ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/src/org/ooc/frontend/model/BuiltinType.java

http://github.com/nddrylliog/ooc
Java | 48 lines | 35 code | 13 blank | 0 comment | 0 complexity | dc49a63465fb0b189505418d7babec75 MD5 | raw file
 1package org.ooc.frontend.model;
 2
 3import java.io.IOException;
 4
 5import org.ooc.frontend.Visitor;
 6import org.ooc.frontend.model.tokens.Token;
 7
 8public class BuiltinType extends TypeDecl {
 9
10	protected Type type;
11	
12	public BuiltinType(String name) {
13		this(name, Token.defaultToken);
14	}
15	
16	public BuiltinType(String name, Token startToken) {
17		super(name, null, null, startToken);
18		type = new Type(name, startToken);
19		type.setRef(this);
20	}
21
22	public BuiltinType(Type fromType) {
23		this(fromType.getName());
24	}
25
26	@Override
27	public Type getType() {
28		return type ;
29	}
30
31	public void accept(Visitor visitor) throws IOException {
32		visitor.visit(this);
33	}
34
35	@Override
36	public void acceptChildren(Visitor visitor) throws IOException {}
37
38	@Override
39	public boolean hasChildren() {
40		return false;
41	}
42	
43	@Override
44	public boolean replace(Node oldie, Node kiddo) {
45		return false;
46	}
47	
48}