diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-10-11 14:07:32 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-10-11 14:07:32 +0800 |
commit | 3b8a6b8bcc14ea279a4e6c005e740777b01ab623 (patch) | |
tree | 1de9456ecdf90d2a22059ee10c8ad01302a208d1 /src/parser/grammar.lua | |
parent | 16af212c379e9927143b37bedebcf884445bfdbd (diff) | |
download | lua-language-server-3b8a6b8bcc14ea279a4e6c005e740777b01ab623.zip |
function
Diffstat (limited to 'src/parser/grammar.lua')
-rw-r--r-- | src/parser/grammar.lua | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/parser/grammar.lua b/src/parser/grammar.lua index a4240df2..cb2d2e6f 100644 --- a/src/parser/grammar.lua +++ b/src/parser/grammar.lua @@ -233,13 +233,10 @@ TableField <- NewIndex / NewField / Exp NewIndex <- BL Exp BR ASSIGN Exp NewField <- Name ASSIGN Exp -Function <- {| - FUNCTION FuncName? PL ArgList? PR - (!END Action)* +Function <- (FUNCTION {| FuncName? |} PL ArgList? PR) -> FunctionDef + (!END Action)* -> Function END - |} - -> Function -FuncName <- {:name: {| Name (FuncSuffix)* |} :} +FuncName <- Name (FuncSuffix)* FuncSuffix <- DOT Name / COLON Name |