diff options
author | Li Jin <dragon-fly@qq.com> | 2022-11-21 18:02:25 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-11-21 18:02:25 +0800 |
commit | 1b0bf8554e84bcd4d68dd2131838ea9c923ed694 (patch) | |
tree | 3d0db30605994de6506a307e56f377eaccfba2f6 /src | |
parent | 58cf1a70971ad37ef9260aa93851e92fd6e4c1ce (diff) | |
download | yuescript-1b0bf8554e84bcd4d68dd2131838ea9c923ed694.tar.gz yuescript-1b0bf8554e84bcd4d68dd2131838ea9c923ed694.tar.bz2 yuescript-1b0bf8554e84bcd4d68dd2131838ea9c923ed694.zip |
fix class syntax ambiguous issue.
Diffstat (limited to 'src')
-rw-r--r-- | src/yuescript/yue_compiler.cpp | 2 | ||||
-rw-r--r-- | src/yuescript/yue_parser.cpp | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index cd91c97..cf9f188 100644 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp | |||
@@ -60,7 +60,7 @@ namespace yue { | |||
60 | 60 | ||
61 | typedef std::list<std::string> str_list; | 61 | typedef std::list<std::string> str_list; |
62 | 62 | ||
63 | const std::string_view version = "0.15.15"sv; | 63 | const std::string_view version = "0.15.16"sv; |
64 | const std::string_view extension = "yue"sv; | 64 | const std::string_view extension = "yue"sv; |
65 | 65 | ||
66 | class YueCompilerImpl { | 66 | class YueCompilerImpl { |
diff --git a/src/yuescript/yue_parser.cpp b/src/yuescript/yue_parser.cpp index 24f821c..1ff772b 100644 --- a/src/yuescript/yue_parser.cpp +++ b/src/yuescript/yue_parser.cpp | |||
@@ -523,11 +523,11 @@ YueParser::YueParser() { | |||
523 | ClassBlock = +SpaceBreak >> Advance >> Seperator >> ClassLine >> *(+SpaceBreak >> ClassLine) >> PopIndent; | 523 | ClassBlock = +SpaceBreak >> Advance >> Seperator >> ClassLine >> *(+SpaceBreak >> ClassLine) >> PopIndent; |
524 | 524 | ||
525 | ClassDecl = | 525 | ClassDecl = |
526 | Space >> key("class") >> not_(expr(':')) >> | 526 | Space >> key("class") >> not_(expr(':')) >> disable_arg_table_block( |
527 | -Assignable >> | 527 | -Assignable >> |
528 | -(Space >> key("extends") >> PreventIndent >> ensure(Exp, PopIndent)) >> | 528 | -(Space >> key("extends") >> PreventIndent >> ensure(Exp, PopIndent)) >> |
529 | -(Space >> key("using") >> PreventIndent >> ensure(ExpList, PopIndent)) >> | 529 | -(Space >> key("using") >> PreventIndent >> ensure(ExpList, PopIndent)) |
530 | -ClassBlock; | 530 | ) >> -ClassBlock; |
531 | 531 | ||
532 | global_values = NameList >> -(sym('=') >> (TableBlock | ExpListLow)); | 532 | global_values = NameList >> -(sym('=') >> (TableBlock | ExpListLow)); |
533 | global_op = expr('*') | expr('^'); | 533 | global_op = expr('*') | expr('^'); |