Skip to content

Commit

Permalink
Depend on prebuilt tree-sitter-bash (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
verhovsky committed May 5, 2023
1 parent a8e3cf6 commit 870b882
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "curlconverter",
"version": "4.7.0",
"version": "4.7.1",
"description": "convert curl commands to Python, JavaScript, Go, PHP and more",
"homepage": "https://curlconverter.com",
"author": {
Expand All @@ -25,7 +25,7 @@
"type": "module",
"dependencies": {
"@curlconverter/tree-sitter": "^0.0.10",
"@curlconverter/tree-sitter-bash": "^0.0.2",
"@curlconverter/tree-sitter-bash": "^0.0.3",
"jsesc": "^3.0.2",
"lossless-json": "^2.0.8",
"web-tree-sitter": "^0.20.8",
Expand Down
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import { _toWget, toWgetWarn } from "./generators/wget.js";
import fs from "fs";

// This line is updated by extract_curl_args.py
const VERSION = "4.7.0 (curl 8.0.1)";
const VERSION = "4.7.1 (curl 8.0.1)";

// sets a default in case --language isn't passed
const defaultLanguage = "python";
Expand Down
10 changes: 5 additions & 5 deletions src/shell/tokenizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ function toTokens(
return [removeBackslashes(node.text)];
case "raw_string":
return [node.text.slice(1, -1)];
case "ansii_c_string":
case "ansi_c_string":
return [removeAnsiCBackslashes(node.text.slice(2, -1))];
case "string":
case "string_expansion": {
case "translated_string": {
// TODO: MISSING quotes, for example
// curl "example.com
let prevEnd = node.type === "string" ? 1 : 2;
Expand Down Expand Up @@ -241,7 +241,7 @@ function toTokens(
throw new CCError(
"unexpected argument type " +
JSON.stringify(node.type) +
'. Must be one of "word", "string", "raw_string", "ansii_c_string", "expansion", "simple_expansion", "string_expansion" or "concatenation"\n' +
'. Must be one of "word", "string", "raw_string", "ansi_c_string", "expansion", "simple_expansion", "translated_string" or "concatenation"\n' +
underlineNode(node, curlCommand)
);
}
Expand Down Expand Up @@ -520,8 +520,8 @@ function extractCommandNodes(
// word |
// "string" |
// 'raw_string' |
// $'ansii_c_string' |
// $"string_expansion" |
// $'ansi_c_string' |
// $"translated_string" |
// ${expansion} |
// $simple_expansion |
// concatenation)))
Expand Down

0 comments on commit 870b882

Please sign in to comment.