Add 'operator' aliases

This commit is contained in:
Bruno BELANYI 2024-04-08 02:13:43 +01:00
parent 25924c3c5c
commit 3e46a9b762
7 changed files with 121 additions and 68 deletions

View file

@ -17,6 +17,7 @@ foo = 42
(source_file
(assignment
(identifier)
(operator)
(integer_literal)))
================================================================================
@ -30,6 +31,7 @@ foo = bar
(source_file
(assignment
(identifier)
(operator)
(identifier)))
================================================================================
@ -43,6 +45,7 @@ foo += 12
(source_file
(assignment
(identifier)
(operator)
(integer_literal)))
================================================================================
@ -57,9 +60,11 @@ bar = 27
(source_file
(assignment
(identifier)
(operator)
(integer_literal))
(assignment
(identifier)
(operator)
(integer_literal)))
================================================================================
@ -78,19 +83,25 @@ qux += 1
(source_file
(assignment
(identifier)
(operator)
(integer_literal))
(assignment
(identifier)
(operator)
(integer_literal))
(assignment
(identifier)
(operator)
(integer_literal))
(assignment
(identifier)
(operator)
(integer_literal))
(assignment
(identifier)
(operator)
(integer_literal))
(assignment
(identifier)
(operator)
(integer_literal)))

View file

@ -10,9 +10,11 @@ foo = true
(source_file
(assignment
(identifier)
(operator)
(boolean_literal))
(assignment
(identifier)
(operator)
(boolean_literal)))
================================================================================
@ -27,9 +29,11 @@ false = true
(source_file
(assignment
(identifier)
(operator)
(boolean_literal))
(assignment
(identifier)
(operator)
(boolean_literal)))
================================================================================
@ -44,9 +48,11 @@ foo = 42
(source_file
(assignment
(identifier)
(operator)
(integer_literal))
(assignment
(identifier)
(operator)
(integer_literal)))
================================================================================
@ -61,9 +67,11 @@ foo = -42
(source_file
(assignment
(identifier)
(operator)
(integer_literal))
(assignment
(identifier)
(operator)
(integer_literal)))
================================================================================
@ -77,6 +85,7 @@ foo = "Hello World!"
(source_file
(assignment
(identifier)
(operator)
(interpreted_string_literal)))
================================================================================
@ -90,6 +99,7 @@ foo = "Hello\nWorld!"
(source_file
(assignment
(identifier)
(operator)
(interpreted_string_literal
(escape_sequence))))
@ -104,6 +114,7 @@ foo = `Hello\nWorld!`
(source_file
(assignment
(identifier)
(operator)
(raw_string_literal)))
================================================================================
@ -117,6 +128,7 @@ foo = []
(source_file
(assignment
(identifier)
(operator)
(list_expression)))
================================================================================
@ -130,6 +142,7 @@ foo = [42]
(source_file
(assignment
(identifier)
(operator)
(list_expression
(integer_literal))))
@ -146,6 +159,7 @@ foo = [
(source_file
(assignment
(identifier)
(operator)
(list_expression
(integer_literal))))
@ -162,6 +176,7 @@ foo = [
(source_file
(assignment
(identifier)
(operator)
(list_expression
(integer_literal))))
@ -179,6 +194,7 @@ foo = [
(source_file
(assignment
(identifier)
(operator)
(list_expression
(integer_literal)
(interpreted_string_literal))))
@ -198,6 +214,7 @@ foo = [
(source_file
(assignment
(identifier)
(operator)
(list_expression
(list_expression
(integer_literal))
@ -218,6 +235,7 @@ foo = [
(source_file
(assignment
(identifier)
(operator)
(list_expression
(ERROR))))
@ -232,6 +250,7 @@ foo = {}
(source_file
(assignment
(identifier)
(operator)
(map_expression)))
================================================================================
@ -245,6 +264,7 @@ foo = {foo:42}
(source_file
(assignment
(identifier)
(operator)
(map_expression
(property
(identifier)
@ -263,6 +283,7 @@ foo = {
(source_file
(assignment
(identifier)
(operator)
(map_expression
(property
(identifier)
@ -281,6 +302,7 @@ foo = {
(source_file
(assignment
(identifier)
(operator)
(map_expression
(property
(identifier)
@ -300,6 +322,7 @@ foo = {
(source_file
(assignment
(identifier)
(operator)
(map_expression
(property
(identifier)
@ -321,6 +344,7 @@ foo = {
(source_file
(assignment
(identifier)
(operator)
(map_expression
(property
(identifier)
@ -342,6 +366,7 @@ foo = {
(source_file
(assignment
(identifier)
(operator)
(map_expression
(ERROR))))
@ -359,12 +384,16 @@ foo = [
(source_file
(assignment
(identifier)
(operator)
(list_expression
(binary_expression
(binary_expression
(integer_literal)
(operator)
(integer_literal))
(operator)
(integer_literal))
(binary_expression
(interpreted_string_literal)
(operator)
(interpreted_string_literal)))))

View file

@ -12,6 +12,7 @@ foo = select(release_variable("RELEASE_TEST"), {
(source_file
(assignment
(identifier)
(operator)
(select_expression
(select_value
(selection_type)
@ -37,6 +38,7 @@ foo = select(soong_config_variable("my_namespace", "my_var"), {
(source_file
(assignment
(identifier)
(operator)
(select_expression
(soong_config_variable
(selection_type)
@ -66,6 +68,7 @@ foo = select(variant("arch"), {
(source_file
(assignment
(identifier)
(operator)
(select_expression
(select_value
(selection_type)
@ -95,6 +98,7 @@ foo = select(variant("VARIANT"), {})
(source_file
(assignment
(identifier)
(operator)
(select_expression
(select_value
(selection_type)
@ -118,6 +122,7 @@ foo = select(variant("VARIANT"), {
(source_file
(assignment
(identifier)
(operator)
(select_expression
(select_value
(selection_type)
@ -153,6 +158,7 @@ foo = select(variant(), {
(source_file
(assignment
(identifier)
(operator)
(select_expression
(select_value
(selection_type)
@ -178,6 +184,7 @@ foo = select(some_unknown_type("CONDITION"), {
(source_file
(assignment
(identifier)
(operator)
(ERROR
(identifier)
(identifier)