summaryrefslogtreecommitdiff
path: root/Homework/cs5300/p4-formatter/submit/ast/StringConstant.java
blob: 4bf37383bce6e8f6b36d955421c65e6072afe979 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * Code formatter project
 * CS 4481
 */
package submit.ast;

/**
 *
 * @author edwajohn
 */
public class StringConstant implements Expression, Constant {

  private final String value;

  public StringConstant(String value) {
    this.value = value;
  }

  public void toCminus(StringBuilder builder, final String prefix) {
    builder.append("\"").append(value).append("\"");
  }

}