Skip to content

Commit

Permalink
chore(ast): return const reference in get_ast
Browse files Browse the repository at this point in the history
  • Loading branch information
jahan-addison committed Dec 21, 2024
1 parent efad2cc commit a07b0b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion roxas/ast.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Abstract_Syntax_Tree::Abstract_Syntax_Tree(std::string_view parse_tree)
* @return ast_type the AST data structure
*/

Abstract_Syntax_Tree::ast_type& Abstract_Syntax_Tree::get_ast()
const Abstract_Syntax_Tree::ast_type& Abstract_Syntax_Tree::get_ast()
{
return ast_;
}
Expand Down
2 changes: 1 addition & 1 deletion roxas/ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Abstract_Syntax_Tree
*
* @return ast_type the AST data structure
*/
ast_type& get_ast();
const ast_type& get_ast();

private:
std::string_view parse_tree_;
Expand Down

0 comments on commit a07b0b9

Please sign in to comment.