[issue]to fix {} symbol tag
This commit is contained in:
parent
937e1b3631
commit
55c7288031
|
@ -20,8 +20,7 @@ impl NonblockingAssignmentStatement {
|
|||
assert_eq!(json_children[1]["tag"], "<=");
|
||||
assert_eq!(json_children[3]["tag"], ";");
|
||||
|
||||
let json_symbol_identifier = Tools::match_tags(
|
||||
vec![&json_children[0]],
|
||||
let lpvalue_paths = [
|
||||
vec![
|
||||
Tag::LP_VALUE,
|
||||
Tag::REFERENCE_CALL_BASE,
|
||||
|
@ -30,8 +29,35 @@ impl NonblockingAssignmentStatement {
|
|||
Tag::UNQUALIFIED_ID,
|
||||
Tag::SYMBOL_IDENTIFIER,
|
||||
],
|
||||
);
|
||||
assert_eq!(json_symbol_identifier.len(), 1);
|
||||
vec![
|
||||
Tag::LP_VALUE,
|
||||
Tag::BRACEGROUP,
|
||||
Tag::OPEN_RANGE_LIST,
|
||||
Tag::EXPRESSION,
|
||||
Tag::REFERENCE_CALL_BASE,
|
||||
Tag::REFERENCE,
|
||||
Tag::LOCAL_ROOT,
|
||||
Tag::UNQUALIFIED_ID,
|
||||
Tag::SYMBOL_IDENTIFIER,
|
||||
],
|
||||
];
|
||||
|
||||
let json_symbol_identifier: Vec<_> = lpvalue_paths
|
||||
.iter()
|
||||
.flat_map(|x|Tools::match_tags(vec![&json_children[0]], x.to_vec()))
|
||||
.collect();
|
||||
// let json_symbol_identifier = Tools::match_tags(
|
||||
// vec![&json_children[0]],
|
||||
// vec![
|
||||
// Tag::LP_VALUE,
|
||||
// Tag::REFERENCE_CALL_BASE,
|
||||
// Tag::REFERENCE,
|
||||
// Tag::LOCAL_ROOT,
|
||||
// Tag::UNQUALIFIED_ID,
|
||||
// Tag::SYMBOL_IDENTIFIER,
|
||||
// ],
|
||||
// );
|
||||
//assert_eq!(json_symbol_identifier.len(), 1);
|
||||
|
||||
(json_symbol_identifier[0], &json_children[2])
|
||||
};
|
||||
|
|
|
@ -131,4 +131,5 @@ impl Tag {
|
|||
pub const LOGICAL_NOT: &'static str = "!";
|
||||
pub const BITWISE_NOT: &'static str = "~";
|
||||
pub const XOR_REDUCE: &'static str = "^";
|
||||
pub const BRACEGROUP: &'static str = "kBraceGroup";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue