Skip to content

Commit e84383c

Browse files
committed
Add parenthesis precedence to mintypmax expressions
1 parent 1f52638 commit e84383c

File tree

16 files changed

+889656
-888969
lines changed

16 files changed

+889656
-888969
lines changed

grammar.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3962,7 +3962,7 @@ const rules = {
39623962
seq($.constant_multiple_concatenation, optseq('[', $._constant_range_expression, ']')),
39633963
$.constant_function_call, // Out of LRM: original was 'seq($.constant_function_call, optseq('[', $._constant_range_expression, ']'))'
39643964
// $._constant_let_expression, // No need to add since it's syntax is the same as a tf_call/constant_function_call (true ambiguity that adds conflicts)
3965-
seq('(', $.constant_mintypmax_expression, ')'),
3965+
paren_expr($.constant_mintypmax_expression),
39663966
$.constant_cast,
39673967
$._constant_assignment_pattern_expression,
39683968
$.type_reference,
@@ -3998,7 +3998,7 @@ const rules = {
39983998
seq($.multiple_concatenation, optseq('[', $.range_expression, ']')),
39993999
$.function_subroutine_call,
40004000
// $.let_expression, // No need to add since its syntax is the same as a tf_call/subroutine_call (true ambiguity that adds conflicts)
4001-
seq('(', $.mintypmax_expression, ')'),
4001+
paren_expr($.mintypmax_expression),
40024002
$.cast,
40034003
$.assignment_pattern_expression,
40044004
$.streaming_concatenation,
@@ -6105,7 +6105,6 @@ module.exports = grammar({
61056105
[$.module_path_primary, $.primary_literal],
61066106
[$.tf_call, $.constant_primary, $.module_path_primary, $.hierarchical_identifier],
61076107
[$.module_path_primary, $.primary],
6108-
[$.casting_type, $.path_delay_expression, $.constant_primary],
61096108
[$.full_path_description, $.full_edge_sensitive_path_description],
61106109
[$.parallel_path_description, $.parallel_edge_sensitive_path_description],
61116110
[$.scalar_timing_check_condition, $.mintypmax_expression],

0 commit comments

Comments
 (0)