Bash++
Bash++ compiler internal documentation
resolve_entity.h
Go to the documentation of this file.
1
5#pragma once
6
7#include <fstream>
8#include <memory>
9#include <string>
10#include <cstdint>
11
12#include "../../antlr/BashppLexer.h"
13#include "../../antlr/BashppParser.h"
14#include "../../bpp_include/bpp_codegen.h"
15#include "explode.h"
16
17antlr4::tree::ParseTree* find_node_at_column(antlr4::tree::ParseTree* single_line_node, uint32_t column);
18
38std::shared_ptr<bpp::bpp_entity> resolve_entity_at(
39 const std::string& file,
40 uint32_t line,
41 uint32_t column,
42 std::shared_ptr<bpp::bpp_program> program,
43 bool utf16_mode,
44 const std::string& file_contents = ""
45);
46
56std::string find_comments_for_entity(std::shared_ptr<bpp::bpp_entity> entity);
std::shared_ptr< bpp::bpp_entity > resolve_entity_at(const std::string &file, uint32_t line, uint32_t column, std::shared_ptr< bpp::bpp_program > program, bool utf16_mode, const std::string &file_contents="")
Resolves the entity referenced at the given line and column in the specified file.
Definition resolve_entity.cpp:42
std::string find_comments_for_entity(std::shared_ptr< bpp::bpp_entity > entity)
Finds comments ostensibly associated with the given entity's definition.
Definition resolve_entity.cpp:533
antlr4::tree::ParseTree * find_node_at_column(antlr4::tree::ParseTree *single_line_node, uint32_t column)
Definition resolve_entity.cpp:11