Skip to content

Commit

Permalink
fixed unresolved issues after manual port of
Browse files Browse the repository at this point in the history
  • Loading branch information
p-bakker committed Jun 8, 2021
1 parent 86323ba commit b74edb9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/org/mozilla/javascript/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -3087,6 +3087,7 @@ private AstNode primaryExpr() throws IOException {
return new KeywordLiteral(pos, end - pos, tt);

case Token.QUASI:
consumeToken();
return quasiLiteral();

case Token.RESERVED:
Expand Down
2 changes: 1 addition & 1 deletion src/org/mozilla/javascript/ScriptRuntime.java
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ public static String escapeString(String s) {
* For escaping strings printed by object and array literals; not quite the same as 'escape.'
*/
public static String escapeString(String s, char escapeQuote) {
if (!(escapeQuote == '"' || escapeQuote == '\'' || escapeQuote == '`')) Kit.codeBug();
if (!(escapeQuote == '"' || escapeQuote == '\'')) Kit.codeBug();
StringBuilder sb = null;

for (int i = 0, L = s.length(); i != L; ++i) {
Expand Down
4 changes: 2 additions & 2 deletions src/org/mozilla/javascript/TokenStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ final int getToken() throws IOException {
}

// is it a string?
if (c == '"' || c == '\'' || c == '`') {
if (c == '"' || c == '\'') {
// We attempt to accumulate a string the fast way, by
// building it directly out of the reader. But if there
// are any escaped characters in the string, we revert to
Expand Down Expand Up @@ -2022,7 +2022,7 @@ private int getCharIgnoreLineEnd(boolean skipFormattingChars) throws IOException
}
} else {
if (c == BYTE_ORDER_MARK) return c; // BOM is considered whitespace
if (isJSFormatChar(c)) {
if (skipFormattingChars && isJSFormatChar(c)) {
continue;
}
if (ScriptRuntime.isJSLineTerminator(c)) {
Expand Down

0 comments on commit b74edb9

Please sign in to comment.