From e02780668e0ce2ebf7088bad2e70ad94b6824b08 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Wed, 9 Nov 2022 15:17:17 +0800 Subject: fix readme. --- README.md | 7 ++++++- src/yuescript/yue_parser.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 50124d1..31198dc 100644 --- a/README.md +++ b/README.md @@ -87,17 +87,22 @@ Usage: yue [options|files|directories] ... -h Print this message -e str Execute a file or raw codes + -m Generate minified codes -t path Specify where to place compiled files -o file Write output to file -s Use spaces in generated codes instead of tabs - -m Generate minified codes -p Write output to standard out -b Dump compile time (doesn't write output) + -g Dump global variables used in NAME LINE COLUMN -l Write line numbers from source codes -v Print version -- Read from standard in, print to standard out (Must be first and only argument) + --target=version Specify the Lua version that codes will be generated to + (version can only be 5.1, 5.2, 5.3 or 5.4) + --path=path_str Append an extra Lua search path string to package.path + Execute without options to enter REPL, type symbol '$' in a single line to start/stop multi-line mode ``` diff --git a/src/yuescript/yue_parser.cpp b/src/yuescript/yue_parser.cpp index df64759..0d9a183 100644 --- a/src/yuescript/yue_parser.cpp +++ b/src/yuescript/yue_parser.cpp @@ -544,7 +544,7 @@ YueParser::YueParser() { | (not_(Space >> export_default) >> pl::user(true_(), [](const item_t& item) { State* st = reinterpret_cast(item.user_data); if (st->exportDefault && st->exportCount > 1) { - throw ParserError("can not export more items when export default has been declared", *item.begin, *item.end); + throw ParserError("can not export any more items when 'export default' is declared", *item.begin, *item.end); } return true; }) >> ExpList >> -Assign) -- cgit v1.2.3-55-g6feb