Compare commits
No commits in common. "aeb1fc2bb595d47f7ce76cddabddcfd76c7f0043" and "4e60cf3c2e613625c06f6f85540b3631e2d06cd3" have entirely different histories.
aeb1fc2bb5
...
4e60cf3c2e
5 changed files with 1283 additions and 1415 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
//! ```
|
//! ```
|
||||||
//! let code = "";
|
//! let code = "";
|
||||||
//! let mut parser = tree_sitter::Parser::new();
|
//! let mut parser = tree_sitter::Parser::new();
|
||||||
//! parser.set_language(tree_sitter_bp::language()).expect("Error loading bp grammar");
|
//! parser.set_language(tree_sitter_bp::language()).expect("Error loading txtpb grammar");
|
||||||
//! let tree = parser.parse(code, None).unwrap();
|
//! let tree = parser.parse(code, None).unwrap();
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ module.exports = grammar({
|
||||||
|
|
||||||
select_cases: ($) => seq(
|
select_cases: ($) => seq(
|
||||||
"{",
|
"{",
|
||||||
optional(commaSeparatedOptTrailing($.select_case)),
|
optional(commaSeparatedTrailing($.select_case)),
|
||||||
"}",
|
"}",
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
|
||||||
47
src/grammar.json
generated
47
src/grammar.json
generated
|
|
@ -614,41 +614,20 @@
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SEQ",
|
"type": "REPEAT",
|
||||||
"members": [
|
"content": {
|
||||||
{
|
"type": "SEQ",
|
||||||
"type": "SYMBOL",
|
"members": [
|
||||||
"name": "select_case"
|
{
|
||||||
},
|
"type": "SYMBOL",
|
||||||
{
|
"name": "select_case"
|
||||||
"type": "REPEAT",
|
},
|
||||||
"content": {
|
{
|
||||||
"type": "SEQ",
|
"type": "STRING",
|
||||||
"members": [
|
"value": ","
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": ","
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "select_case"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
]
|
||||||
{
|
}
|
||||||
"type": "CHOICE",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": ","
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "BLANK"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "BLANK"
|
"type": "BLANK"
|
||||||
|
|
|
||||||
2622
src/parser.c
generated
2622
src/parser.c
generated
File diff suppressed because it is too large
Load diff
|
|
@ -33,31 +33,6 @@ foo = select(release_variable("RELEASE_TEST"), {
|
||||||
(default))
|
(default))
|
||||||
(unset))))))
|
(unset))))))
|
||||||
|
|
||||||
================================================================================
|
|
||||||
Select (no trailing comma)
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
foo = select(release_variable("RELEASE_TEST"), {
|
|
||||||
default: unset
|
|
||||||
})
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
(source_file
|
|
||||||
(assignment
|
|
||||||
(identifier)
|
|
||||||
(operator)
|
|
||||||
(select_expression
|
|
||||||
(select_value
|
|
||||||
(condition
|
|
||||||
(identifier)
|
|
||||||
(interpreted_string_literal)))
|
|
||||||
(select_cases
|
|
||||||
(select_case
|
|
||||||
(select_pattern
|
|
||||||
(default))
|
|
||||||
(unset))))))
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
Select (soong config variable)
|
Select (soong config variable)
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue