diff options
Diffstat (limited to 'submit/ast/CharConstant.java')
-rw-r--r-- | submit/ast/CharConstant.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/submit/ast/CharConstant.java b/submit/ast/CharConstant.java new file mode 100644 index 0000000..8ca801d --- /dev/null +++ b/submit/ast/CharConstant.java @@ -0,0 +1,23 @@ +/* + * Code formatter project + * CS 4481 + */ +package submit.ast; + +/** + * + * @author edwajohn + */ +public class CharConstant extends AbstractNode implements Expression { + + private final char value; + + public CharConstant(char value) { + this.value = value; + } + + public void toCminus(StringBuilder builder, final String prefix) { + builder.append("'").append(value).append("'"); + } + +} |