PageRenderTime 464ms CodeModel.GetById 242ms app.highlight 3ms RepoModel.GetById 218ms app.codeStats 0ms

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

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