summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/command.h3
-rw-r--r--src/logger.cpp9
-rw-r--r--src/plugin.cpp4
3 files changed, 15 insertions, 1 deletions
diff --git a/src/command.h b/src/command.h
index c2f129c..e5cb62b 100644
--- a/src/command.h
+++ b/src/command.h
@@ -23,7 +23,8 @@
enum Command : int
{
Parse = 0,
- Dump
+ Dump,
+ SmallDump
};
extern Command command;
diff --git a/src/logger.cpp b/src/logger.cpp
index 9a3b936..5cd65b6 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -108,6 +108,15 @@ void log(const Node *const node,
void log(const Node *const node)
{
+ if (command == Command::SmallDump)
+ {
+ fprintf(stderr,
+ "%s %s\n",
+ node->nodeType.c_str(),
+ node->file.c_str());
+ return;
+ }
+
if (command != Command::Dump)
return;
diff --git a/src/plugin.cpp b/src/plugin.cpp
index 78f3ee1..0bc47ad 100644
--- a/src/plugin.cpp
+++ b/src/plugin.cpp
@@ -58,6 +58,10 @@ int plugin_init (struct plugin_name_args *plugin_info,
{
command = Command::Dump;
}
+ else if (cmd == "smalldump")
+ {
+ command = Command::SmallDump;
+ }
else
{
error("Plugin %s. Unknown command: %s",