Skip to content

Commit

Permalink
💡 Update in-code documents
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharp0802 committed Oct 4, 2024
1 parent 205803d commit a81ac04
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = docs ild langs
INPUT = docs lilac langs

# This tag can be used to specify the character encoding of the source files
# that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
3 changes: 3 additions & 0 deletions lilac/compilesymbolsubcommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

namespace lilac
{
/**
* @brief A sub-command that compiles assemblies into symbols
*/
class CompileSymbolSubCommand final : public SubCommand
{
llvm::cl::opt<shared::FrontendKind> Language;
Expand Down
3 changes: 3 additions & 0 deletions lilac/generatesubcommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

namespace lilac
{
/**
* @brief A sub-command that generates bindings from symbols
*/
class GenerateSubCommand final : public SubCommand
{
llvm::cl::opt<std::string> OutputPath;
Expand Down
16 changes: 16 additions & 0 deletions lilac/subcommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,25 @@

namespace lilac
{
/**
* @brief An abstraction class of `llvm::cl::SubCommand`
*/
class SubCommand
{
llvm::cl::SubCommand m_SubCommand;

public:
/**
* @brief Creates a sub-command with given name and description
* @param command A name of the sub-command
* @param desc A description of the sub-command
*/
SubCommand(const char* command, const char* desc);

/**
* @brief Runs a subcommand
* @return Zero will be returned when completed successfully; otherwise, non-zero will be returned
*/
virtual int Run() = 0;

virtual ~SubCommand() = default;
Expand All @@ -38,6 +50,10 @@ namespace lilac

operator bool() const;

/**
* @brief Gets default category of all sub-commands registered by LILAC
* @return Returns default category of all sub-commands registered by LILAC
*/
static llvm::cl::OptionCategory& GetCategory();
};
}

0 comments on commit a81ac04

Please sign in to comment.