Skip to content

Commit

Permalink
refactor: moved some types from variables module to types module and …
Browse files Browse the repository at this point in the history
…updated Variable object definition

FossilOrigin-Name: 3c546934c181ffd6a60d4558bfcdc96c81585fea6fab47ec3333361651d61ef6
  • Loading branch information
thindil committed Oct 22, 2024
1 parent 735261b commit a8e9143
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 9 additions & 3 deletions src/types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ type
VariableValType* = enum
## Used to set the type of variable's value
path, text, number
VariableName* = string
## Used to store variables names in the database
VariableValue* = string
## Used to store variables' values
VariableDescription* = string
## Used to store variables' descriptions
Variable* {.tableName: "variables".} = ref object of Model
## Data structure for the shell's environment variable
##
Expand All @@ -160,12 +166,12 @@ type
## * recursive - if true, the variable is available also in subdirectories
## * value - the value of the variable
## * description - the description of the variable
name*: string
name*: VariableName
path*: Path
recursive*: bool
value*: string
value*: VariableValue
varType*: VariableValType
description*: string
description*: VariableDescription
ResultCode* = distinct Natural
## Used to store result code from commands entered by the user
CommandName* = string
Expand Down
6 changes: 0 additions & 6 deletions src/variables.nim
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ const
'n': "number", 'q': "quit"}.toTable
## The list of available options when setting the type of a variable's value

type
VariableName = string
## Used to store variables names in the database.
VariableValue = string
## Used to store variables' values

using
db: DbConn # Connection to the shell's database
arguments: UserInput # The string with arguments entered by the user for the command
Expand Down

0 comments on commit a8e9143

Please sign in to comment.