Add 'soong_config_variable' selection

This commit is contained in:
Bruno BELANYI 2024-04-08 01:25:09 +01:00
parent 12553c3bb8
commit a78ad8139f
5 changed files with 1440 additions and 1003 deletions

View file

@ -91,7 +91,7 @@ module.exports = grammar({
select_expression: ($) => seq(
"select",
"(",
$.select_value,
choice($.select_value, $.soong_config_variable),
",",
$.select_cases,
")",
@ -107,6 +107,20 @@ module.exports = grammar({
")",
),
soong_config_variable: ($) => seq(
field("type", alias("soong_config_variable", $.selection_type)),
"(",
field(
"condition",
seq(
field("namespace", $._string_literal),
",",
field("variable", $._string_literal),
),
),
")",
),
select_cases: ($) => seq(
"{",
optional(trailingCommaSeparated($.select_case)),