From afd51162c33ef2048becac6a13372a2cedebea98 Mon Sep 17 00:00:00 2001 From: Bolun Thompson Date: Wed, 15 Jan 2025 01:47:09 +0000 Subject: [PATCH 1/2] Fix: misc bash bugfixes --- shasta/ast_node.py | 5 ++++- shasta/bash_to_shasta_ast.py | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/shasta/ast_node.py b/shasta/ast_node.py index ce0b292..24f2dee 100644 --- a/shasta/ast_node.py +++ b/shasta/ast_node.py @@ -1236,10 +1236,12 @@ class SingleArgRedirNode(RedirectionNode, BashNode): NodeName = "SingleArg" redir_type: str fd: FdType # Either ('var', filename) or ('fixed', fd) + arg: None def __init__(self, redir_type, fd): self.redir_type = redir_type self.fd = fd + self.arg = None # TODO: Implement # def __repr__(self): @@ -1274,7 +1276,8 @@ def handle_redirvarassign(item: FdType, showFdUnless: int | None = None) -> str: class GroupNode(AstNode, BashNode): NodeName = 'Group' body: Command - redirections: list + # TODO: Support redirections + # redirections: list def __init__(self, body): self.body = body diff --git a/shasta/bash_to_shasta_ast.py b/shasta/bash_to_shasta_ast.py index 7b9b4d5..ab7acd9 100644 --- a/shasta/bash_to_shasta_ast.py +++ b/shasta/bash_to_shasta_ast.py @@ -304,6 +304,8 @@ def to_until_node(node: WhileCom) -> WhileNode: def to_group_node(node: GroupCom) -> GroupNode: + # TODO: Support redirections + # Libbash doesn't store the redirs currently return GroupNode(to_ast_node(node.command)) From 88ac68623f1bb8acddeecc66b064f46b645242c5 Mon Sep 17 00:00:00 2001 From: Bolun Thompson Date: Wed, 15 Jan 2025 03:53:33 +0000 Subject: [PATCH 2/2] Inc version --- pyproject.toml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7f0c030..1415b65 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "shasta" -version = "0.2.1" +version = "0.2.2" authors = [ { name="Konstantinos Kallas", email="konstantinos.kallas@hotmail.com" }, ] diff --git a/setup.py b/setup.py index 2019c97..cc918ac 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ long_description = (Path(__file__).parent / "README.md").read_text() setup(name='shasta', - version='0.2.1', + version='0.2.2', packages=['shasta'], ## Necessary for the markdown to be properly rendered long_description=long_description,