diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/bash_ast.cpp | 10 | ||||
-rw-r--r-- | src/core/bash_ast.h | 8 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/core/bash_ast.cpp b/src/core/bash_ast.cpp index 3787f84..213264c 100644 --- a/src/core/bash_ast.cpp +++ b/src/core/bash_ast.cpp @@ -211,6 +211,11 @@ long bash_ast::walker_arithmetics(plibbashWalker tree_parser) return tree_parser->arithmetics(tree_parser); } +std::string bash_ast::walker_string_expr(libbashWalker_Ctx_struct* tree_parser) +{ + return tree_parser->string_expr(tree_parser).libbash_value; +} + pANTLR3_BASE_TREE bash_ast::parser_start(plibbashParser parser) { return parser->start(parser).tree; @@ -221,6 +226,11 @@ pANTLR3_BASE_TREE bash_ast::parser_arithmetics(plibbashParser parser) return parser->arithmetics(parser).tree; } +pANTLR3_BASE_TREE bash_ast::parser_all_expansions(libbashParser_Ctx_struct* parser) +{ + return parser->all_expansions(parser).tree; +} + void bash_ast::call_function(plibbashWalker ctx, ANTLR3_MARKER index) { diff --git a/src/core/bash_ast.h b/src/core/bash_ast.h index 1dd7be2..8aa291a 100644 --- a/src/core/bash_ast.h +++ b/src/core/bash_ast.h @@ -92,6 +92,10 @@ public: /// \param tree_parser the pointer to the tree_parser static long walker_arithmetics(libbashWalker_Ctx_struct* tree_parser); + /// \brief the functor for walker string_expr rule + /// \param tree_parser the pointer to the tree_parser + static std::string walker_string_expr(libbashWalker_Ctx_struct* tree_parser); + /// \brief call a function that is defined in the AST /// \param tree_parser the pointer to the tree_parser /// \param index the function index @@ -106,6 +110,10 @@ public: /// \param parser the pointer to the parser static pANTLR3_BASE_TREE parser_arithmetics(libbashParser_Ctx_struct* parser); + /// \brief the functor for parser all_expansions rule + /// \param parser the pointer to the parser + static pANTLR3_BASE_TREE parser_all_expansions(libbashParser_Ctx_struct* parser); + /// /// \brief interpret the script with a given interpreter /// \param walker the interpreter object |