aboutsummaryrefslogtreecommitdiff
path: root/src/yue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/yue.cpp')
-rw-r--r--src/yue.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/yue.cpp b/src/yue.cpp
index 7e39367..f48d14b 100644
--- a/src/yue.cpp
+++ b/src/yue.cpp
@@ -520,9 +520,6 @@ int main(int narg, const char** args) {
520 std::string workPath; 520 std::string workPath;
521 std::list<std::pair<std::string, std::string>> files; 521 std::list<std::pair<std::string, std::string>> files;
522 522
523 auto isOptionToken = [](std::string_view s) {
524 return !s.empty() && (s[0] == '-' || (s.size() >= 2 && s.substr(0, 2) == "--"sv));
525 };
526 auto takeValue = [&](int& i, std::string_view arg, std::string_view optName) -> std::string { 523 auto takeValue = [&](int& i, std::string_view arg, std::string_view optName) -> std::string {
527 // supports: --opt=value, --opt value, -o value, -t value, etc. 524 // supports: --opt=value, --opt value, -o value, -t value, etc.
528 if (auto eq = arg.find('='); eq != std::string_view::npos) { 525 if (auto eq = arg.find('='); eq != std::string_view::npos) {
@@ -697,6 +694,9 @@ int main(int narg, const char** args) {
697 if (resultFile.empty()) return 1; 694 if (resultFile.empty()) return 1;
698 } else if (arg == "-w"sv || arg == "--watch"sv || arg.rfind("--watch="sv, 0) == 0) { 695 } else if (arg == "-w"sv || arg == "--watch"sv || arg.rfind("--watch="sv, 0) == 0) {
699#ifndef YUE_NO_WATCHER 696#ifndef YUE_NO_WATCHER
697 auto isOptionToken = [](std::string_view s) {
698 return !s.empty() && (s[0] == '-' || (s.size() >= 2 && s.substr(0, 2) == "--"sv));
699 };
700 watchFiles = true; 700 watchFiles = true;
701 // accept optional directory value: -w <dir> / --watch <dir> / --watch=<dir> 701 // accept optional directory value: -w <dir> / --watch <dir> / --watch=<dir>
702 if (arg != "-w"sv) { 702 if (arg != "-w"sv) {