2021-06-17 19:39:46 +02:00
|
|
|
================================================================================
|
2021-06-11 23:47:51 +02:00
|
|
|
for tuple expression
|
2021-06-17 19:39:46 +02:00
|
|
|
================================================================================
|
2021-06-11 23:47:51 +02:00
|
|
|
|
|
|
|
|
foo = [for v in ["a", "b"]: v]
|
|
|
|
|
|
2021-06-17 19:39:46 +02:00
|
|
|
--------------------------------------------------------------------------------
|
2021-06-11 23:47:51 +02:00
|
|
|
|
2021-06-14 23:33:28 +02:00
|
|
|
(config_file
|
|
|
|
|
(body
|
|
|
|
|
(attribute
|
|
|
|
|
(identifier)
|
|
|
|
|
(expression
|
2021-06-17 19:39:46 +02:00
|
|
|
(for_expr
|
|
|
|
|
(for_tuple_expr
|
|
|
|
|
(for_intro
|
2021-06-14 23:33:28 +02:00
|
|
|
(identifier)
|
|
|
|
|
(expression
|
2021-06-17 19:39:46 +02:00
|
|
|
(collection_value
|
|
|
|
|
(tuple
|
|
|
|
|
(expression
|
|
|
|
|
(literal_value
|
|
|
|
|
(string_lit
|
2021-07-01 23:57:52 +02:00
|
|
|
(quoted_template_start)
|
|
|
|
|
(template_literal)
|
|
|
|
|
(quoted_template_end))))
|
2021-06-17 19:39:46 +02:00
|
|
|
(expression
|
|
|
|
|
(literal_value
|
|
|
|
|
(string_lit
|
2021-07-01 23:57:52 +02:00
|
|
|
(quoted_template_start)
|
|
|
|
|
(template_literal)
|
|
|
|
|
(quoted_template_end))))))))
|
2021-06-17 19:39:46 +02:00
|
|
|
(expression
|
|
|
|
|
(variable_expr
|
|
|
|
|
(identifier)))))))))
|
|
|
|
|
|
|
|
|
|
================================================================================
|
2021-06-11 23:57:34 +02:00
|
|
|
for tuple expression with index
|
2021-06-17 19:39:46 +02:00
|
|
|
================================================================================
|
2021-06-11 23:57:34 +02:00
|
|
|
|
|
|
|
|
foo = [for i, v in ["a", "b"]: i]
|
|
|
|
|
|
2021-06-17 19:39:46 +02:00
|
|
|
--------------------------------------------------------------------------------
|
2021-06-11 23:57:34 +02:00
|
|
|
|
2021-06-14 23:33:28 +02:00
|
|
|
(config_file
|
|
|
|
|
(body
|
|
|
|
|
(attribute
|
|
|
|
|
(identifier)
|
|
|
|
|
(expression
|
2021-06-17 19:39:46 +02:00
|
|
|
(for_expr
|
|
|
|
|
(for_tuple_expr
|
|
|
|
|
(for_intro
|
2021-06-14 23:33:28 +02:00
|
|
|
(identifier)
|
|
|
|
|
(identifier)
|
|
|
|
|
(expression
|
2021-06-17 19:39:46 +02:00
|
|
|
(collection_value
|
|
|
|
|
(tuple
|
|
|
|
|
(expression
|
|
|
|
|
(literal_value
|
|
|
|
|
(string_lit
|
2021-07-01 23:57:52 +02:00
|
|
|
(quoted_template_start)
|
|
|
|
|
(template_literal)
|
|
|
|
|
(quoted_template_end))))
|
2021-06-17 19:39:46 +02:00
|
|
|
(expression
|
|
|
|
|
(literal_value
|
|
|
|
|
(string_lit
|
2021-07-01 23:57:52 +02:00
|
|
|
(quoted_template_start)
|
|
|
|
|
(template_literal)
|
|
|
|
|
(quoted_template_end))))))))
|
2021-06-17 19:39:46 +02:00
|
|
|
(expression
|
|
|
|
|
(variable_expr
|
|
|
|
|
(identifier)))))))))
|
|
|
|
|
|
|
|
|
|
================================================================================
|
2021-06-11 23:58:30 +02:00
|
|
|
for tuple expression with predicate
|
2021-06-17 19:39:46 +02:00
|
|
|
================================================================================
|
2021-06-11 23:58:30 +02:00
|
|
|
|
|
|
|
|
foo = [for i, v in ["a", "b", "c"]: v if pred(i)]
|
|
|
|
|
|
2021-06-17 19:39:46 +02:00
|
|
|
--------------------------------------------------------------------------------
|
2021-06-11 23:58:30 +02:00
|
|
|
|
2021-06-14 23:33:28 +02:00
|
|
|
(config_file
|
|
|
|
|
(body
|
|
|
|
|
(attribute
|
|
|
|
|
(identifier)
|
2021-06-17 19:39:46 +02:00
|
|
|
(expression
|
|
|
|
|
(for_expr
|
|
|
|
|
(for_tuple_expr
|
|
|
|
|
(for_intro
|
|
|
|
|
(identifier)
|
|
|
|
|
(identifier)
|
|
|
|
|
(expression
|
|
|
|
|
(collection_value
|
|
|
|
|
(tuple
|
|
|
|
|
(expression
|
|
|
|
|
(literal_value
|
|
|
|
|
(string_lit
|
2021-07-01 23:57:52 +02:00
|
|
|
(quoted_template_start)
|
|
|
|
|
(template_literal)
|
|
|
|
|
(quoted_template_end))))
|
2021-06-17 19:39:46 +02:00
|
|
|
(expression
|
|
|
|
|
(literal_value
|
|
|
|
|
(string_lit
|
2021-07-01 23:57:52 +02:00
|
|
|
(quoted_template_start)
|
|
|
|
|
(template_literal)
|
|
|
|
|
(quoted_template_end))))
|
2021-06-17 19:39:46 +02:00
|
|
|
(expression
|
|
|
|
|
(literal_value
|
|
|
|
|
(string_lit
|
2021-07-01 23:57:52 +02:00
|
|
|
(quoted_template_start)
|
|
|
|
|
(template_literal)
|
|
|
|
|
(quoted_template_end))))))))
|
2021-06-17 19:39:46 +02:00
|
|
|
(expression
|
|
|
|
|
(variable_expr
|
|
|
|
|
(identifier)))
|
|
|
|
|
(for_cond
|
|
|
|
|
(expression
|
|
|
|
|
(function_call
|
2021-06-14 23:33:28 +02:00
|
|
|
(identifier)
|
2021-06-17 19:39:46 +02:00
|
|
|
(function_arguments
|
2021-06-14 23:33:28 +02:00
|
|
|
(expression
|
2021-06-17 19:39:46 +02:00
|
|
|
(variable_expr
|
|
|
|
|
(identifier)))))))))))))
|
|
|
|
|
|
|
|
|
|
================================================================================
|
2021-06-14 23:33:28 +02:00
|
|
|
for object expression
|
2021-06-17 19:39:46 +02:00
|
|
|
================================================================================
|
2021-06-11 23:57:34 +02:00
|
|
|
|
|
|
|
|
foo = {for i, v in ["a", "b"]: v => i}
|
|
|
|
|
|
2021-06-17 19:39:46 +02:00
|
|
|
--------------------------------------------------------------------------------
|
2021-06-11 23:57:34 +02:00
|
|
|
|
|
|
|
|
(config_file
|
|
|
|
|
(body
|
2021-06-14 23:33:28 +02:00
|
|
|
(attribute
|
|
|
|
|
(identifier)
|
|
|
|
|
(expression
|
2021-06-17 19:39:46 +02:00
|
|
|
(for_expr
|
|
|
|
|
(for_object_expr
|
|
|
|
|
(for_intro
|
|
|
|
|
(identifier)
|
|
|
|
|
(identifier)
|
|
|
|
|
(expression
|
|
|
|
|
(collection_value
|
|
|
|
|
(tuple
|
|
|
|
|
(expression
|
|
|
|
|
(literal_value
|
|
|
|
|
(string_lit
|
2021-07-01 23:57:52 +02:00
|
|
|
(quoted_template_start)
|
|
|
|
|
(template_literal)
|
|
|
|
|
(quoted_template_end))))
|
2021-06-17 19:39:46 +02:00
|
|
|
(expression
|
|
|
|
|
(literal_value
|
|
|
|
|
(string_lit
|
2021-07-01 23:57:52 +02:00
|
|
|
(quoted_template_start)
|
|
|
|
|
(template_literal)
|
|
|
|
|
(quoted_template_end))))))))
|
2021-06-17 19:39:46 +02:00
|
|
|
(expression
|
|
|
|
|
(variable_expr
|
|
|
|
|
(identifier)))
|
|
|
|
|
(expression
|
|
|
|
|
(variable_expr
|
|
|
|
|
(identifier)))))))))
|
|
|
|
|
|
|
|
|
|
================================================================================
|
2021-06-11 23:57:34 +02:00
|
|
|
for object expression 2
|
2021-06-17 19:39:46 +02:00
|
|
|
================================================================================
|
2021-06-11 23:57:34 +02:00
|
|
|
|
|
|
|
|
foo = {for i, v in ["a", "b"]: v => i...}
|
|
|
|
|
|
2021-06-17 19:39:46 +02:00
|
|
|
--------------------------------------------------------------------------------
|
2021-06-11 23:57:34 +02:00
|
|
|
|
|
|
|
|
(config_file
|
|
|
|
|
(body
|
2021-06-14 23:33:28 +02:00
|
|
|
(attribute
|
|
|
|
|
(identifier)
|
|
|
|
|
(expression
|
2021-06-17 19:39:46 +02:00
|
|
|
(for_expr
|
|
|
|
|
(for_object_expr
|
|
|
|
|
(for_intro
|
|
|
|
|
(identifier)
|
|
|
|
|
(identifier)
|
|
|
|
|
(expression
|
|
|
|
|
(collection_value
|
|
|
|
|
(tuple
|
|
|
|
|
(expression
|
|
|
|
|
(literal_value
|
|
|
|
|
(string_lit
|
2021-07-01 23:57:52 +02:00
|
|
|
(quoted_template_start)
|
|
|
|
|
(template_literal)
|
|
|
|
|
(quoted_template_end))))
|
2021-06-17 19:39:46 +02:00
|
|
|
(expression
|
|
|
|
|
(literal_value
|
|
|
|
|
(string_lit
|
2021-07-01 23:57:52 +02:00
|
|
|
(quoted_template_start)
|
|
|
|
|
(template_literal)
|
|
|
|
|
(quoted_template_end))))))))
|
2021-06-17 19:39:46 +02:00
|
|
|
(expression
|
|
|
|
|
(variable_expr
|
|
|
|
|
(identifier)))
|
|
|
|
|
(expression
|
|
|
|
|
(variable_expr
|
|
|
|
|
(identifier)))
|
|
|
|
|
(ellipsis)))))))
|