PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

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

http://github.com/nddrylliog/ooc
Java | 46 lines | 32 code | 14 blank | 0 comment | 0 complexity | 429bddf05aa239fc124bb9ceb655c1cf 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
 8
 9public class BoolLiteral extends Literal {
10
11	public static Type type = new Type("Bool", Token.defaultToken);
12	protected boolean value;
13	
14	public BoolLiteral(boolean value, Token token) {
15		super(token);
16		this.value = value;
17	}
18	
19	public boolean getValue() {
20		return value;
21	}
22	
23	public void setValue(boolean value) {
24		this.value = value;
25	}
26
27	public Type getType() {
28		return type;
29	}
30	
31	public void accept(Visitor visitor) throws IOException {
32		visitor.visit(this);
33	}
34	
35	public boolean hasChildren() {
36		return false;
37	}
38	
39	public void acceptChildren(Visitor visitor) throws IOException {}
40	
41	@Override
42	public boolean replace(Node oldie, Node kiddo) {
43		return false;
44	}
45
46}