Skip to content
Snippets Groups Projects
Commit 6da26cc6 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

[fix] reuse existing ellipsis node

parent 437f5173
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -642,15 +642,6 @@ def generate_parse(print_function):
"value": string_chain
}
 
@pg.production("atom : DOT DOT DOT")
def ellipsis(pack):
(first_, middle_, last_) = pack
return {
"type": "name",
"formatting": first_.hidden_tokens_after,
"value": "...",
}
@pg.production("strings : string strings")
def strings_string_strings(pack):
(string_, strings_) = pack
Loading
Loading
Loading
Loading
@@ -254,6 +254,7 @@ def include_operators(pg):
}]
 
@pg.production("subscript : DOT DOT DOT")
@pg.production("atom : DOT DOT DOT")
def subscript_ellipsis(pack):
(dot1, dot2, dot3) = pack
return {
Loading
Loading
Loading
Loading
@@ -384,9 +384,9 @@ def test_ellipsis():
"..."
parse_simple([('DOT', '.'), ('DOT', '.'),('DOT', '.')], [
{
"type": "name",
"formatting": [],
"value": "...",
"type": "ellipsis",
"first_formatting": [],
"second_formatting": [],
}
])
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment