Skip to content

Commit

Permalink
prevent error in type for SystemVerilog IEEE 1800-2017
Browse files Browse the repository at this point in the history
  • Loading branch information
qarlosalberto committed Dec 3, 2023
1 parent d2c5d82 commit c50a408
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
39 changes: 20 additions & 19 deletions packages/colibri/src/parser/ts_verilog/elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -781,26 +781,27 @@ export function get_generics(tree: any, lines: any, comments: any, ansi: any, co
comment = utils_hdl.get_comment_with_break(pre_comment, comment_symbol);
}

const item: common_hdl.Port_hdl = {
hdl_element_type: common_hdl.TYPE_HDL_ELEMENT.PORT,
info: {
position: {
line: inputs[x].startPosition.row,
column: 0
try {
const item: common_hdl.Port_hdl = {
hdl_element_type: common_hdl.TYPE_HDL_ELEMENT.PORT,
info: {
position: {
line: inputs[x].startPosition.row,
column: 0
},
name: get_generic_name(inputs[x], lines),
description: comment
},
name: get_generic_name(inputs[x], lines),
description: comment
},
type: get_generic_kind(inputs[x], lines),
subtype: "",
direction: "",
inline_comment: "",
over_comment: "",
default_value: get_generic_default(inputs[x], lines),
};


items.push(item);
type: get_generic_kind(inputs[x], lines),
subtype: "",
direction: "",
inline_comment: "",
over_comment: "",
default_value: get_generic_default(inputs[x], lines),
};
items.push(item);
}
catch (error) { /* empty */ }
}
return items;
}
Expand Down
4 changes: 0 additions & 4 deletions packages/colibri/src/parser/ts_verilog/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@ export class Verilog_parser extends Ts_base_parser implements Parser_base {
|| cursor.nodeType === 'package_declaration') {
cursor.gotoFirstChild();





do {
if (cursor.nodeType === 'package_or_generate_item_declaration') {
cursor.gotoFirstChild();
Expand Down

0 comments on commit c50a408

Please sign in to comment.