summaryrefslogtreecommitdiff
path: root/src/parser/grammar.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-10-11 14:07:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-10-11 14:07:32 +0800
commit3b8a6b8bcc14ea279a4e6c005e740777b01ab623 (patch)
tree1de9456ecdf90d2a22059ee10c8ad01302a208d1 /src/parser/grammar.lua
parent16af212c379e9927143b37bedebcf884445bfdbd (diff)
downloadlua-language-server-3b8a6b8bcc14ea279a4e6c005e740777b01ab623.zip
function
Diffstat (limited to 'src/parser/grammar.lua')
-rw-r--r--src/parser/grammar.lua9
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