diff options
Diffstat (limited to '')
| -rwxr-xr-x | src/yuescript/yue_compiler.cpp | 2 | ||||
| -rwxr-xr-x | 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 b9b51bf..d270455 100755 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp | |||
| @@ -56,7 +56,7 @@ using namespace parserlib; | |||
| 56 | 56 | ||
| 57 | typedef std::list<std::string> str_list; | 57 | typedef std::list<std::string> str_list; |
| 58 | 58 | ||
| 59 | const std::string_view version = "0.10.25"sv; | 59 | const std::string_view version = "0.11.0"sv; |
| 60 | const std::string_view extension = "yue"sv; | 60 | const std::string_view extension = "yue"sv; |
| 61 | 61 | ||
| 62 | class YueCompilerImpl { | 62 | class YueCompilerImpl { |
diff --git a/src/yuescript/yue_parser.cpp b/src/yuescript/yue_parser.cpp index ef414d4..54dd174 100755 --- a/src/yuescript/yue_parser.cpp +++ b/src/yuescript/yue_parser.cpp | |||
| @@ -305,7 +305,7 @@ YueParser::YueParser() { | |||
| 305 | catch_block = Break >> *EmptyLine >> CheckIndent >> Space >> key("catch") >> Space >> Variable >> InBlock; | 305 | catch_block = Break >> *EmptyLine >> CheckIndent >> Space >> key("catch") >> Space >> Variable >> InBlock; |
| 306 | Try = Space >> key("try") >> (InBlock | Exp) >> -catch_block; | 306 | Try = Space >> key("try") >> (InBlock | Exp) >> -catch_block; |
| 307 | 307 | ||
| 308 | Comprehension = sym('[') >> Exp >> Space >> CompInner >> sym(']'); | 308 | Comprehension = sym('[') >> not_('[') >> Exp >> Space >> CompInner >> sym(']'); |
| 309 | comp_value = sym(',') >> Exp; | 309 | comp_value = sym(',') >> Exp; |
| 310 | TblComprehension = sym('{') >> Exp >> -comp_value >> Space >> CompInner >> sym('}'); | 310 | TblComprehension = sym('{') >> Exp >> -comp_value >> Space >> CompInner >> sym('}'); |
| 311 | 311 | ||
| @@ -446,7 +446,7 @@ YueParser::YueParser() { | |||
| 446 | chain_with_colon = +ChainItem >> -ColonChain; | 446 | chain_with_colon = +ChainItem >> -ColonChain; |
| 447 | ChainItems = chain_with_colon | ColonChain; | 447 | ChainItems = chain_with_colon | ColonChain; |
| 448 | 448 | ||
| 449 | Index = symx('[') >> Exp >> sym(']'); | 449 | Index = symx('[') >> not_('[') >> Exp >> sym(']'); |
| 450 | ChainItem = Invoke >> -existential_op | DotChainItem >> -existential_op | Slice | Index >> -existential_op; | 450 | ChainItem = Invoke >> -existential_op | DotChainItem >> -existential_op | Slice | Index >> -existential_op; |
| 451 | DotChainItem = symx('.') >> (Name >> not_('#') | Metatable | Metamethod); | 451 | DotChainItem = symx('.') >> (Name >> not_('#') | Metatable | Metamethod); |
| 452 | ColonChainItem = (expr('\\') | expr("::")) >> ((LuaKeyword | Name) >> not_('#') | Metamethod); | 452 | ColonChainItem = (expr('\\') | expr("::")) >> ((LuaKeyword | Name) >> not_('#') | Metamethod); |
| @@ -455,7 +455,7 @@ YueParser::YueParser() { | |||
| 455 | 455 | ||
| 456 | default_value = true_(); | 456 | default_value = true_(); |
| 457 | Slice = | 457 | Slice = |
| 458 | symx('[') >> | 458 | symx('[') >> not_('[') >> |
| 459 | (Exp | default_value) >> | 459 | (Exp | default_value) >> |
| 460 | sym(',') >> | 460 | sym(',') >> |
| 461 | (Exp | default_value) >> | 461 | (Exp | default_value) >> |
| @@ -537,7 +537,7 @@ YueParser::YueParser() { | |||
| 537 | 537 | ||
| 538 | normal_pair = ( | 538 | normal_pair = ( |
| 539 | KeyName | | 539 | KeyName | |
| 540 | sym('[') >> Exp >> sym(']') | | 540 | sym('[') >> not_('[') >> Exp >> sym(']') | |
| 541 | Space >> DoubleString | | 541 | Space >> DoubleString | |
| 542 | Space >> SingleString | | 542 | Space >> SingleString | |
| 543 | Space >> LuaString | 543 | Space >> LuaString |
| @@ -549,7 +549,7 @@ YueParser::YueParser() { | |||
| 549 | 549 | ||
| 550 | meta_variable_pair = sym(':') >> Variable >> expr('#'); | 550 | meta_variable_pair = sym(':') >> Variable >> expr('#'); |
| 551 | 551 | ||
| 552 | meta_normal_pair = Space >> -(Name | symx('[') >> Exp >> sym(']')) >> expr("#:") >> | 552 | meta_normal_pair = Space >> -(Name | symx('[') >> not_('[') >> Exp >> sym(']')) >> expr("#:") >> |
| 553 | (Exp | TableBlock | +(SpaceBreak) >> Exp); | 553 | (Exp | TableBlock | +(SpaceBreak) >> Exp); |
| 554 | 554 | ||
| 555 | meta_default_pair = (sym(':') >> Variable >> expr('#') >> Seperator | Space >> -Name >> expr("#:") >> Seperator >> Exp) >> sym('=') >> Exp; | 555 | meta_default_pair = (sym(':') >> Variable >> expr('#') >> Seperator | Space >> -Name >> expr("#:") >> Seperator >> Exp) >> sym('=') >> Exp; |
