Mercurial > hg > Members > kono > PLparser
comparison src/plparser/BooleanProperty.java @ 6:563bcb96e4fa
pretty printer
author | one |
---|---|
date | Mon, 30 Aug 2010 12:35:23 +0900 |
parents | b149a5aa465a |
children |
comparison
equal
deleted
inserted
replaced
5:29b5497fc942 | 6:563bcb96e4fa |
---|---|
1 package plparser; | 1 package plparser; |
2 | |
3 import java.io.PrintStream; | |
2 | 4 |
3 public class BooleanProperty extends Property { | 5 public class BooleanProperty extends Property { |
4 boolean b; | 6 boolean b; |
5 | 7 |
6 public BooleanProperty(TokenID id) { | 8 public BooleanProperty(TokenID id) { |
7 b = id==TokenID.True; | 9 b = id==TokenID.True; |
8 } | 10 } |
9 | 11 |
10 public String toString() { | 12 public String toString() { |
11 return b?"True":"Fasel"; | 13 return b?"True":"False"; |
12 } | 14 } |
13 | 15 |
16 public void pp(PrintStream out, int indent,int flag) { | |
17 indent(out, indent,flag); | |
18 out.print(toString()); | |
19 } | |
14 | 20 |
15 } | 21 } |