Skip to content
Snippets Groups Projects
Commit 4af094a1 authored by Marcin Sawicki's avatar Marcin Sawicki Committed by Laurent Peuch
Browse files

Literal ellipsis as first class citizen

parent b9eff656
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -642,6 +642,15 @@ 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
@@ -380,6 +380,17 @@ def test_file_input_simple_stmt_one_item_semicolon_space():
])
 
 
def test_ellipsis():
"..."
parse_simple([('DOT', '.'), ('DOT', '.'),('DOT', '.')], [
{
"type": "name",
"formatting": [],
"value": "...",
}
])
def test_funcdef_stmt_indent():
"""
def a () :
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