diff options
author | Aleksey Kladov <[email protected]> | 2018-07-31 10:32:53 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-07-31 10:32:53 +0100 |
commit | ff71cb1f6de07479610fb0f45e740b249e8a01c6 (patch) | |
tree | 29df6315075f7e0339e8687a78a5bfcef776f900 /src/parser/grammar/expressions.rs | |
parent | c244dd10343ff96a73879c593bd9253c4073cb90 (diff) |
Introduce param & arg list
Diffstat (limited to 'src/parser/grammar/expressions.rs')
-rw-r--r-- | src/parser/grammar/expressions.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/parser/grammar/expressions.rs b/src/parser/grammar/expressions.rs index 92aaafa3d..7991b1921 100644 --- a/src/parser/grammar/expressions.rs +++ b/src/parser/grammar/expressions.rs | |||
@@ -70,6 +70,13 @@ fn tuple_expr(p: &mut Parser) -> CompletedMarker { | |||
70 | fn call_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker { | 70 | fn call_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker { |
71 | assert!(p.at(L_PAREN)); | 71 | assert!(p.at(L_PAREN)); |
72 | let m = lhs.precede(p); | 72 | let m = lhs.precede(p); |
73 | arg_list(p); | ||
74 | m.complete(p, CALL_EXPR) | ||
75 | } | ||
76 | |||
77 | fn arg_list(p: &mut Parser) { | ||
78 | assert!(p.at(L_PAREN)); | ||
79 | let m = p.start(); | ||
73 | p.bump(); | 80 | p.bump(); |
74 | while !p.at(R_PAREN) && !p.at(EOF) { | 81 | while !p.at(R_PAREN) && !p.at(EOF) { |
75 | expr(p); | 82 | expr(p); |
@@ -78,7 +85,7 @@ fn call_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker { | |||
78 | } | 85 | } |
79 | } | 86 | } |
80 | p.eat(R_PAREN); | 87 | p.eat(R_PAREN); |
81 | m.complete(p, CALL_EXPR) | 88 | m.complete(p, ARG_LIST); |
82 | } | 89 | } |
83 | 90 | ||
84 | // test path_expr | 91 | // test path_expr |