diff options
Diffstat (limited to 'Homework/cs5300/compiler/p5-compiler/submit/ast/CharConstant.java')
| -rw-r--r-- | Homework/cs5300/compiler/p5-compiler/submit/ast/CharConstant.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Homework/cs5300/compiler/p5-compiler/submit/ast/CharConstant.java b/Homework/cs5300/compiler/p5-compiler/submit/ast/CharConstant.java new file mode 100644 index 0000000..5334be2 --- /dev/null +++ b/Homework/cs5300/compiler/p5-compiler/submit/ast/CharConstant.java @@ -0,0 +1,19 @@ +/* + * 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("'"); + } +} |
