diff --git a/src/scanner.c b/src/scanner.c index 3afcd60..a81e62f 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -151,6 +151,7 @@ static bool scan_automatic_semicolon(TSLexer *lexer, bool comment_condition, boo } switch (lexer->lookahead) { + case '`': case ',': case ':': case ';': diff --git a/test/corpus/expressions.txt b/test/corpus/expressions.txt index b0513e4..283b450 100644 --- a/test/corpus/expressions.txt +++ b/test/corpus/expressions.txt @@ -64,7 +64,7 @@ Template strings `\ `; -`The command \`git ${args.join(' ')}\` exited with an unexpected code: ${exitCode}. The caller should either handle this error, or expect that exit code.` +`The command \`git ${args.join(' ')}\` exited with an unexpected code: ${exitCode}. The caller should either handle this error, or expect that exit code.`; `\\`; @@ -154,10 +154,17 @@ Function calls with template strings ============================================ f `hello`; +f +`hello`; --- (program + (expression_statement + (call_expression + (identifier) + (template_string + (string_fragment)))) (expression_statement (call_expression (identifier)