systemrdl_wrapper

Types

SystemrdlNodeKind = enum
  systemrdlAccesstypeLiteral, ## accesstype_literal
  systemrdlAddressingtypeLiteral, ## addressingtype_literal
  systemrdlArray,           ## array
  systemrdlArrayLiteral,    ## array_literal
  systemrdlArrayType,       ## array_type
  systemrdlBasicDataType,   ## basic_data_type
  systemrdlBinaryOperator,  ## binary_operator
  systemrdlBooleanLiteral,  ## boolean_literal
  systemrdlCastingType,     ## casting_type
  systemrdlComponentAnonDef, ## component_anon_def
  systemrdlComponentBody,   ## component_body
  systemrdlComponentBodyElem, ## component_body_elem
  systemrdlComponentDef,    ## component_def
  systemrdlComponentInst,   ## component_inst
  systemrdlComponentInstAlias, ## component_inst_alias
  systemrdlComponentInstArrayOrRange, ## component_inst_array_or_range
  systemrdlComponentInstType, ## component_inst_type
  systemrdlComponentInsts,  ## component_insts
  systemrdlComponentNamedDef, ## component_named_def
  systemrdlComponentPrimaryType, ## component_primary_type
  systemrdlComponentType,   ## component_type
  systemrdlConstantCast,    ## constant_cast
  systemrdlConstantConcatenation, ## constant_concatenation
  systemrdlConstantExpression, ## constant_expression
  systemrdlConstantMultipleConcatenation, ## constant_multiple_concatenation
  systemrdlConstantPrimary, ## constant_primary
  systemrdlConstraintBody,  ## constraint_body
  systemrdlConstraintDef,   ## constraint_def
  systemrdlConstraintDefAnon, ## constraint_def_anon
  systemrdlConstraintDefExp, ## constraint_def_exp
  systemrdlConstraintElem,  ## constraint_elem
  systemrdlConstraintInsts, ## constraint_insts
  systemrdlConstraintLhs,   ## constraint_lhs
  systemrdlConstraintPropAssignment, ## constraint_prop_assignment
  systemrdlConstraintValue, ## constraint_value
  systemrdlConstraintValues, ## constraint_values
  systemrdlDataType,        ## data_type
  systemrdlDescription,     ## description
  systemrdlEnumBody,        ## enum_body
  systemrdlEnumDef,         ## enum_def
  systemrdlEnumEntry,       ## enum_entry
  systemrdlEnumPropertyAssignment, ## enum_property_assignment
  systemrdlEnumeratorLiteral, ## enumerator_literal
  systemrdlExplicitComponentInst, ## explicit_component_inst
  systemrdlExplicitEncodeAssignment, ## explicit_encode_assignment
  systemrdlExplicitOrDefaultPropAssignment, ## explicit_or_default_prop_assignment
  systemrdlExplicitPropAssignment, ## explicit_prop_assignment
  systemrdlExplicitPropModifier, ## explicit_prop_modifier
  systemrdlInstanceOrPropRef, ## instance_or_prop_ref
  systemrdlInstanceRef,     ## instance_ref
  systemrdlInstanceRefElement, ## instance_ref_element
  systemrdlIntegerType,     ## integer_type
  systemrdlNumber,          ## number
  systemrdlOnreadtypeLiteral, ## onreadtype_literal
  systemrdlOnwritetypeLiteral, ## onwritetype_literal
  systemrdlParamDef,        ## param_def
  systemrdlParamDefElem,    ## param_def_elem
  systemrdlParamElem,       ## param_elem
  systemrdlParamInst,       ## param_inst
  systemrdlParamValue,      ## param_value
  systemrdlPostEncodeAssignment, ## post_encode_assignment
  systemrdlPostPropAssignment, ## post_prop_assignment
  systemrdlPrecedencetypeLiteral, ## precedencetype_literal
  systemrdlPrimaryLiteral,  ## primary_literal
  systemrdlPropAssignmentLhs, ## prop_assignment_lhs
  systemrdlPropAssignmentRhs, ## prop_assignment_rhs
  systemrdlPropKeyword,     ## prop_keyword
  systemrdlPropMod,         ## prop_mod
  systemrdlPropRef,         ## prop_ref
  systemrdlPropertyAssignment, ## property_assignment
  systemrdlPropertyAttribute, ## property_attribute
  systemrdlPropertyBody,    ## property_body
  systemrdlPropertyCompType, ## property_comp_type
  systemrdlPropertyCompTypes, ## property_comp_types
  systemrdlPropertyConstraint, ## property_constraint
  systemrdlPropertyDataType, ## property_data_type
  systemrdlPropertyDefault, ## property_default
  systemrdlPropertyDefinition, ## property_definition
  systemrdlPropertyType,    ## property_type
  systemrdlPropertyUsage,   ## property_usage
  systemrdlRange,           ## range
  systemrdlSimpleType,      ## simple_type
  systemrdlSourceFile,      ## source_file
  systemrdlStringLiteral,   ## string_literal
  systemrdlStructBody,      ## struct_body
  systemrdlStructDef,       ## struct_def
  systemrdlStructElem,      ## struct_elem
  systemrdlStructLiteral,   ## struct_literal
  systemrdlStructLiteralElem, ## struct_literal_elem
  systemrdlStructType,      ## struct_type
  systemrdlUnaryOperator,   ## unary_operator
  systemrdlExclamationTok,  ## !
  systemrdlExclamationEqualTok, ## !=
  systemrdlQuoteTok,        ## "
  systemrdlHashTok,         ## #
  systemrdlPercentTok,      ## %
  systemrdlPercentEqualTok, ## %=
  systemrdlAmpersandTok,    ## &
  systemrdlDoubleAmpersandTok, ## &&
  systemrdlApostropheTok,   ## '
  systemrdlApostropheLCurlyTok, ## '{
  systemrdlLParTok,         ## (
  systemrdlRParTok,         ## )
  systemrdlAsteriskTok,     ## *
  systemrdlDoubleAsteriskTok, ## **
  systemrdlPlusTok,         ## +
  systemrdlPlusEqualTok,    ## +=
  systemrdlCommaTok,        ## ,
  systemrdlMinusTok,        ## -
  systemrdlMinusGreaterThanTok, ## ->
  systemrdlDotTok,          ## .
  systemrdlSlashTok,        ## /
  systemrdlColonTok,        ## :
  systemrdlDoubleColonTok,  ## ::
  systemrdlSemicolonTok,    ## ;
  systemrdlLessThanTok,     ## <
  systemrdlDoubleLessThanTok, ## <<
  systemrdlLessThanEqualTok, ## <=
  systemrdlEqualTok,        ## =
  systemrdlDoubleEqualTok,  ## ==
  systemrdlGreaterThanTok,  ## >
  systemrdlGreaterThanEqualTok, ## >=
  systemrdlDoubleGreaterThanTok, ## >>
  systemrdlQuestionTok,     ## ?
  systemrdlAtTok,           ## @
  systemrdlLBrackTok,       ## [
  systemrdlRBrackTok,       ## ]
  systemrdlAccentTok,       ## ^
  systemrdlAccentTildeTok,  ## ^~
  systemrdlAbstractTok,     ## abstract
  systemrdlAccesstypeTok,   ## accesstype
  systemrdlAddressingtypeTok, ## addressingtype
  systemrdlAddrmapTok,      ## addrmap
  systemrdlAliasTok,        ## alias
  systemrdlAllTok,          ## all
  systemrdlBooleanTok,      ## boolean
  systemrdlBothedgeTok,     ## bothedge
  systemrdlClrTok,          ## clr
  systemrdlComment,         ## comment
  systemrdlCompactTok,      ## compact
  systemrdlComponentTok,    ## component
  systemrdlConstraintTok,   ## constraint
  systemrdlDefaultTok,      ## default
  systemrdlEncodeTok,       ## encode
  systemrdlEnumTok,         ## enum
  systemrdlExternalTok,     ## external
  systemrdlFalseTok,        ## false
  systemrdlFieldTok,        ## field
  systemrdlFullalignTok,    ## fullalign
  systemrdlHwTok,           ## hw
  systemrdlId,              ## id
  systemrdlInsideTok,       ## inside
  systemrdlIntegerAtomType, ## integer_atom_type
  systemrdlIntegerVectorType, ## integer_vector_type
  systemrdlInternalTok,     ## internal
  systemrdlLevelTok,        ## level
  systemrdlMemTok,          ## mem
  systemrdlNaTok,           ## na
  systemrdlNegedgeTok,      ## negedge
  systemrdlNonstickyTok,    ## nonsticky
  systemrdlNumberTok,       ## number
  systemrdlOnreadtypeTok,   ## onreadtype
  systemrdlOnwritetypeTok,  ## onwritetype
  systemrdlPosedgeTok,      ## posedge
  systemrdlPropertyTok,     ## property
  systemrdlPropertyConstraintType, ## property_constraint_type
  systemrdlRTok,            ## r
  systemrdlRclrTok,         ## rclr
  systemrdlRefTok,          ## ref
  systemrdlRegTok,          ## reg
  systemrdlRegalignTok,     ## regalign
  systemrdlRegfileTok,      ## regfile
  systemrdlRsetTok,         ## rset
  systemrdlRuserTok,        ## ruser
  systemrdlRwTok,           ## rw
  systemrdlRw1Tok,          ## rw1
  systemrdlSignalTok,       ## signal
  systemrdlSigning,         ## signing
  systemrdlStringTok,       ## string
  systemrdlStructTok,       ## struct
  systemrdlSwTok,           ## sw
  systemrdlTemplate,        ## template
  systemrdlThisTok,         ## this
  systemrdlTrueTok,         ## true
  systemrdlTypeTok,         ## type
  systemrdlWTok,            ## w
  systemrdlW1Tok,           ## w1
  systemrdlWclrTok,         ## wclr
  systemrdlWoclrTok,        ## woclr
  systemrdlWosetTok,        ## woset
  systemrdlWotTok,          ## wot
  systemrdlWrTok,           ## wr
  systemrdlWsetTok,         ## wset
  systemrdlWuserTok,        ## wuser
  systemrdlWzcTok,          ## wzc
  systemrdlWzsTok,          ## wzs
  systemrdlWztTok,          ## wzt
  systemrdlLCurlyTok,       ## {
  systemrdlPipeTok,         ## |
  systemrdlDoublePipeTok,   ## ||
  systemrdlRCurlyTok,       ## }
  systemrdlTildeTok,        ## ~
  systemrdlTildeAmpersandTok, ## ~&
  systemrdlTildeAccentTok,  ## ~^
  systemrdlTildePipeTok,    ## ~|
  systemrdlSyntaxError       ## Tree-sitter parser syntax error
TsSystemrdlNode = distinct TSNode
SystemrdlParser = distinct PtsParser
SystemrdlNode = HtsNode[TsSystemrdlNode, SystemrdlNodeKind]

Procs

proc kind(node: TsSystemrdlNode): SystemrdlNodeKind {...}{.noSideEffect,
    raises: [Exception], tags: [RootEffect].}
proc tsNodeType(node: TsSystemrdlNode): string {...}{.raises: [], tags: [].}
proc newTsSystemrdlParser(): SystemrdlParser {...}{.raises: [], tags: [].}
proc parseString(parser: SystemrdlParser; str: string): TsSystemrdlNode {...}{.
    raises: [], tags: [].}
proc parseTsSystemrdlString(str: string): TsSystemrdlNode {...}{.raises: [], tags: [].}
proc treeReprTsSystemrdl(str: string; unnamed: bool = false): string {...}{.
    raises: [ValueError, Exception, NilArgumentError], tags: [RootEffect].}
proc toHtsNode(node: TsSystemrdlNode; str: ptr string): HtsNode[TsSystemrdlNode,
    SystemrdlNodeKind] {...}{.raises: [NilArgumentError, Exception],
                         tags: [RootEffect].}
proc toHtsTree(node: TsSystemrdlNode; str: ptr string): SystemrdlNode {...}{.
    raises: [NilArgumentError, Exception], tags: [RootEffect].}
proc parseSystemrdlString(str: ptr string; unnamed: bool = false): SystemrdlNode {...}{.
    raises: [NilArgumentError, Exception], tags: [RootEffect].}
proc parseSystemrdlString(str: string; unnamed: bool = false): SystemrdlNode {...}{.
    raises: [NilArgumentError, Exception], tags: [RootEffect].}

Funcs

func isNil(node: TsSystemrdlNode): bool {...}{.raises: [], tags: [].}
func len(node: TsSystemrdlNode; unnamed: bool = false): int {...}{.raises: [],
    tags: [].}
func has(node: TsSystemrdlNode; idx: int; unnamed: bool = false): bool {...}{.
    raises: [], tags: [].}
func `$`(node: TsSystemrdlNode): string {...}{.raises: [Exception],
    tags: [RootEffect].}
func `[]`(node: TsSystemrdlNode; idx: int;
          kind: SystemrdlNodeKind | set[SystemrdlNodeKind]): TsSystemrdlNode