Skip to content

Commit

Permalink
acyclic types opt
Browse files Browse the repository at this point in the history
None of the types should create cycles
  • Loading branch information
nitely committed Feb 21, 2024
1 parent 4063bbb commit fe50622
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/regex/types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ type
RegexFlags* = set[RegexFlag]

# exptype.nim
RpnExp* = object
RpnExp* {.acyclic.} = object
s*: seq[Node]

# nfatype.nim
Enfa* = object
s*: seq[Node]
Nfa* = object
Nfa* {.acyclic.} = object
s*: seq[Node]

# nodetype.nim
Expand Down Expand Up @@ -93,7 +93,7 @@ type
reSkip, # dummy
reEoe # End of expression
NodeUid* = int16
Node* = object
Node* {.acyclic.} = object
kind*: NodeKind
cp*: Rune
next*: seq[int16]
Expand All @@ -115,7 +115,7 @@ type
# reLookahead, reLookbehind,
# reNotLookahead, reNotLookbehind
subExp*: SubExp
SubExp* = object
SubExp* {.acyclic.} = object
nfa*: Nfa
rpn*: RpnExp
reverseCapts*: bool
Expand Down

0 comments on commit fe50622

Please sign in to comment.