Skip to content

Commit f935cbf

Browse files
committed
renaming and typo fixing
1 parent 0fe1e22 commit f935cbf

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

src/main/java/com/igormaznitsa/prologparser/terms/PrologNumeric.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public PrologNumeric(final int line, final int pos) {
3737
}
3838

3939
/**
40-
* Get numeric repreentation of the saved number.
40+
* Get numeric representation of the saved number.
4141
*
4242
* @return the saved number
4343
*/

src/main/java/com/igormaznitsa/prologparser/terms/PrologTerm.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public String toString() {
203203
if (this.quotation == NONE) {
204204
result = this.text;
205205
} else {
206-
result = this.quotation.quotateString(this.text);
206+
result = this.quotation.quoteString(this.text);
207207
}
208208
return result;
209209
}

src/main/java/com/igormaznitsa/prologparser/terms/Quotation.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
import com.igormaznitsa.prologparser.utils.StringUtils;
2525

26+
import static com.igormaznitsa.prologparser.utils.StringUtils.escapeString;
27+
2628
/**
2729
* Type of quotation for prolog term.
2830
*/
@@ -63,12 +65,12 @@ public String getQuotationMark() {
6365
}
6466

6567
/**
66-
* Quotate string.
68+
* Quote string.
6769
*
68-
* @param str string to quotate, can be null
69-
* @return quotated string
70+
* @param str string to be quoted, can be null
71+
* @return quoted string
7072
*/
71-
public String quotateString(final String str) {
72-
return this.quotationMark + StringUtils.escapeString(str == null ? "" : str, this) + this.quotationMark;
73+
public String quoteString(final String str) {
74+
return this.quotationMark + escapeString(str == null ? "" : str, this) + this.quotationMark;
7375
}
7476
}

src/main/java/com/igormaznitsa/prologparser/tokenizer/Op.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ private static String assertOpValidOpName(final String name) {
241241
* Make operator descriptor describing bunch of operators with same
242242
* characteristics but differently named.
243243
*
244-
* @param precedence the pricedence
244+
* @param precedence the precedence
245245
* @param type the type of operators
246246
* @param names names of operators, must not be empty or contain null
247247
* @return generated operator descriptor

0 commit comments

Comments
 (0)